1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

301 redirect for new trailing slash urls

This commit is contained in:
Matthias Kretschmann 2014-08-31 19:04:01 +02:00
parent 164a4c2a9a
commit 77f08b98b7

View File

@ -659,6 +659,11 @@ FileETag None
# redirect all index.html to parent folder
RewriteCond %{REQUEST_URI} ^(.*/)index\.html$ [NC]
RewriteRule . %1 [R=301,NE,L]
# redirect to leading trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]
</IfModule>