Welcome Guest, Not a member yet? Register   Sign In
force or remove trailing slash: duplicate cache issue
#11

[eluser]RaZoR LeGaCy[/eluser]
Sorry to dig this back up again but I found a working solution.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^([^/]+)/$ $1.html

# Forces a trailing slash to be added
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

Found this on stackoverflow(.)com/questions/9963638/htaccess-remove-url-extension-add-trailing-slash




Theme © iAndrew 2016 - Forum software by © MyBB