add .htaccess
authorAmin Bandali <bandali@gnu.org>
Tue, 21 Apr 2020 04:26:28 +0000 (00:26 -0400)
committerAmin Bandali <bandali@gnu.org>
Tue, 21 Apr 2020 04:26:28 +0000 (00:26 -0400)
Makefile
static/.htaccess [new file with mode: 0644]

index d4a1667..7e36abd 100644 (file)
--- 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 (file)
index 0000000..96c757e
--- /dev/null
@@ -0,0 +1,9 @@
+# www -> no-www
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
+RewriteRule ^ %{REQUEST_SCHEME}://%1%{REQUEST_URI} [R,L]
+</IfModule>
+
+# custom 404 page
+ErrorDocument 404 /404.html