Set redirect status codes to 301
This commit is contained in:
parent
6cdd0b20de
commit
bd73e01e57
|
@ -13,11 +13,11 @@ RewriteCond %{REQUEST_FILENAME} -d
|
||||||
RewriteCond %{REQUEST_URI} !/$
|
RewriteCond %{REQUEST_URI} !/$
|
||||||
RewriteCond %{REQUEST_FILENAME}/index.html -f
|
RewriteCond %{REQUEST_FILENAME}/index.html -f
|
||||||
RewriteRule (.*) $1/index.html [L]
|
RewriteRule (.*) $1/index.html [L]
|
||||||
RewriteRule ^(.*)/$ /$1 [L,R]
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||||
|
|
||||||
# Remove index.html from URLs.
|
# Remove index.html from URLs.
|
||||||
RewriteCond %{THE_REQUEST} \s/+(.*/)?index\.html[\s?] [NC]
|
RewriteCond %{THE_REQUEST} \s/+(.*/)?index\.html[\s?] [NC]
|
||||||
RewriteRule ^(.*)index\.html$ /$1 [L]
|
RewriteRule ^(.*)index\.html$ /$1 [L,R=301]
|
||||||
|
|
||||||
ErrorDocument 404 /404/index.html
|
ErrorDocument 404 /404/index.html
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue