From: Amin Bandali Date: Thu, 14 May 2020 08:41:45 +0000 (-0400) Subject: update htaccess files and makefile according to new setup X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/commitdiff_plain/79d486cb111a13ce1d2858373188ea94252cf057?ds=sidebyside update htaccess files and makefile according to new setup --- diff --git a/Makefile b/Makefile index 7e36abd..22073bd 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ out/notes.rss: meta_feed_rss.m4 ; m4 $< > $@ $(STATIC): ; ln -s $(PWD)/static/$(notdir $@) $@ deploy: - rsync -avzLP out/ abandali@bandali.eu.org:www/ + rsync -avzLP out/ abandali@bandali.eu.org:www/site/ + ssh abandali@bandali.eu.org mv www/site/.htaccess-www www/.htaccess .PHONY: deploy diff --git a/static/.htaccess b/static/.htaccess index 4f38f87..fe09a63 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -1,15 +1,7 @@ -# don't add .html in the rewrite below -Options -MultiViews - -RewriteEngine On -RewriteBase / -# if not already on bandali.eu.org, redirect to there -RewriteCond %{HTTP_HOST} !^bandali\.eu\.org$ -RewriteRule ^(.*)$ https://bandali.eu.org/$1 [R] - -# now we have to explicitly tell apache that files with no -# extension are actually .html +# since we set Options -MultiViews in ../.htaccess, we now have to +# explicitly tell apache that files with no extension are actually +# .html files RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L] diff --git a/static/.htaccess-www b/static/.htaccess-www new file mode 100644 index 0000000..87c80d1 --- /dev/null +++ b/static/.htaccess-www @@ -0,0 +1,10 @@ + +# don't add .html in the rewrite below +Options -MultiViews + +RewriteEngine On +RewriteBase / +# if on csclub.uwaterloo.ca, redirect to bandali.eu.org +RewriteCond %{HTTP_HOST} ^csclub\.uwaterloo\.ca$ +RewriteRule ^(.*)$ https://bandali.eu.org/$1 [R] +