~bandali/site

b791db4e54041eef85f573d7cac5aec9325a6379 — Amin Bandali 7 months ago 466a17d
add .htaccess
2 files changed, 10 insertions(+), 1 deletions(-)

M Makefile
A static/.htaccess
M Makefile => Makefile +1 -1
@@ 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)


A static/.htaccess => static/.htaccess +9 -0
@@ 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