Articles on: FAQs

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.

<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} /+[^\.]+$ 
    RewriteCond %{REQUEST_URI} !^/wp-json
    RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
</IfModule>

Updated on: 11/05/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!