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:
parent
164a4c2a9a
commit
77f08b98b7
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user