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


Messages In This Thread
force or remove trailing slash: duplicate cache issue - by El Forum - 01-21-2008, 09:51 PM
force or remove trailing slash: duplicate cache issue - by El Forum - 06-09-2008, 06:50 PM
force or remove trailing slash: duplicate cache issue - by El Forum - 08-22-2008, 01:50 AM
force or remove trailing slash: duplicate cache issue - by El Forum - 08-22-2008, 02:14 AM
force or remove trailing slash: duplicate cache issue - by El Forum - 08-22-2008, 02:35 AM
force or remove trailing slash: duplicate cache issue - by El Forum - 11-17-2008, 11:46 AM
force or remove trailing slash: duplicate cache issue - by El Forum - 02-16-2009, 01:20 AM
force or remove trailing slash: duplicate cache issue - by El Forum - 06-04-2009, 06:37 PM
force or remove trailing slash: duplicate cache issue - by El Forum - 01-01-2011, 05:48 PM
force or remove trailing slash: duplicate cache issue - by El Forum - 01-03-2011, 11:22 AM
force or remove trailing slash: duplicate cache issue - by El Forum - 08-06-2012, 12:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB