Hi, Just a quick question. How do I add a line to htaccess that if an url does not end with / to add one? example mydomain.com/contact => mydomain.com/contact/ mydomain.com/page/subpage => mydomain.com/page/subpage/ mydomain.com/page/subpage/subpage => mydomain.com/page/subpage/subpage/ Code (markup): Thanks
Mod rewrite will not do this for you. mod rewrite will rewrite the URL behind the scenes so to speak.: You would have to use a PHP or other server code to redirect the page to add the slash. Why are you interested in doing this anyways?
Hi stephan2307, I knew what you think about.Let me help you pls You should use 301 direct at this time. Feel free to try this code: RewriteRule ^contact$ /contact/ [R=301,L] RewriteRule ^page/subpage$ /page/subpage/ [R=301,L] RewriteRule ^page/subpage/subpage$ /page/subpage/subpage/ [R=301,L]