From: Amin Bandali Date: Tue, 21 Apr 2020 04:26:28 +0000 (-0400) Subject: add .htaccess X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/commitdiff_plain/b791db4e54041eef85f573d7cac5aec9325a6379?hp=466a17dd8c5626d3c7efe9d977bad3cd8ae881a2 add .htaccess --- diff --git a/Makefile b/Makefile index d4a1667..7e36abd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SRC := $(filter-out $(wildcard meta_*),$(wildcard *.m4)) OUTPUTS := $(patsubst %.m4,out/%.html,$(SRC)) -STATIC := $(patsubst static/%,out/%,$(wildcard static/*)) +STATIC := $(patsubst static/%,out/%,$(wildcard static/* static/.*)) all: $(OUTPUTS) out/notes.atom out/notes.rss out/style.css $(STATIC) diff --git a/static/.htaccess b/static/.htaccess new file mode 100644 index 0000000..96c757e --- /dev/null +++ b/static/.htaccess @@ -0,0 +1,9 @@ +# www -> no-www + +RewriteEngine On +RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] +RewriteRule ^ %{REQUEST_SCHEME}://%1%{REQUEST_URI} [R,L] + + +# custom 404 page +ErrorDocument 404 /404.html