Add .directory and .htaccess files; updated navigation links in HTML files to use root-relative paths
This commit is contained in:
1 parent
76b26a17b5
commit
b3028be989
7 files changed
+61
-40
No files matched your search
@@ -0,0 +1,19 @@
|
||||
RewriteEngine On
|
||||
|
||||
# /about/ → /about (real folders such as /img/ and /css/ stay as they are)
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.+)/$ /$1 [R=301,L]
|
||||
|
||||
# /index.html → /
|
||||
RewriteCond %{THE_REQUEST} \s/+index\.html[\s?] [NC]
|
||||
RewriteRule ^index\.html$ / [R=301,L,QSA]
|
||||
|
||||
# /about.html → /about
|
||||
RewriteCond %{THE_REQUEST} \s/+(.+?)\.html[\s?] [NC]
|
||||
RewriteRule ^ /%1 [R=301,L,QSA]
|
||||
|
||||
# /about → about.html
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME}.html -f
|
||||
RewriteRule ^(.+?)/?$ $1.html [L]
|
||||
Reference in new issue
Block a user