How to force trailing slash in URLs
If you want to force trailing slash in your URLs, add the following code to your .htaccess file:
Make sure to add this code above FlyingPress rules in htaccess.
Make sure to add this code above FlyingPress rules in htaccess.
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
</IfModule>
Updated on: 11/05/2024
Thank you!