~bandali/site

28e5c31273051174452dcc1be343ea10dd7eb8f6 — Amin Bandali 6 months ago 2eab651 master
move bandali.eu.org-specific bits of .htaccess to caffeine

here we just take care of redirecting csclub.uwaterloo.ca/~abandali/
to bandali.eu.org
1 files changed, 12 insertions(+), 6 deletions(-)

M static/.htaccess
M static/.htaccess => static/.htaccess +12 -6
@@ 1,9 1,15 @@
# www -> no-www
<IfModule mod_rewrite.c>
# don't add .html in the rewrite below
Options -MultiViews

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^ %{REQUEST_SCHEME}://%1%{REQUEST_URI} [R,L]
</IfModule>
RewriteBase /
# if not already on bandali.eu.org, redirect to there
RewriteCond %{HTTP_HOST} !^bandali\.eu\.org$
RewriteRule ^(.*)$ https://bandali.eu.org/$1 [R]

# custom 404 page
ErrorDocument 404 /404.html
# now we have to explicitly tell apache that files with no
# extension are actually .html
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L]
</IfModule>