Files
noema/docs/site/htaccess
T

19 lines
606 B
Plaintext

DirectoryIndex index.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /noema/
# One canonical URL per page: the index at the directory, pages without an
# extension. The .html and trailing-slash forms redirect.
RewriteRule ^index\.html$ /noema/ [R=301,L]
RewriteCond %{THE_REQUEST} \s/+noema/([a-z0-9-]+)\.html(?:[?\s]|$) [NC]
RewriteRule ^([a-z0-9-]+)\.html$ /noema/$1 [R=301,L]
RewriteRule ^([a-z0-9-]+)/$ /noema/$1 [R=301,L]
# Serve pages from their .html files.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([a-z0-9-]+)$ $1.html [L]
</IfModule>