16 lines
434 B
ApacheConf
16 lines
434 B
ApacheConf
|
Options +FollowSymLinks -MultiViews
|
||
|
|
||
|
RewriteEngine on
|
||
|
|
||
|
# Remove trailing slashes from directories.
|
||
|
DirectorySlash Off
|
||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||
|
RewriteCond %{REQUEST_URI} !/$
|
||
|
RewriteCond %{REQUEST_FILENAME}/index.html -f
|
||
|
RewriteRule (.*) $1/index.html [L]
|
||
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||
|
|
||
|
# Remove index.html from URLs.
|
||
|
RewriteCond %{THE_REQUEST} \s/+(.*/)?index\.html[\s?] [NC]
|
||
|
RewriteRule ^(.*)index\.html$ /$1 [L,R=301]
|