2martens.de/.htaccess

17 lines
517 B
ApacheConf
Raw Normal View History

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# rewrite jim.2martens.de to 2martens.de
RewriteCond %{SERVER_NAME} ^jim\.2martens\.de [NC]
RewriteRule ^(.*)$ https://2martens.de/$1 [L,R=301]
# custom 404 error page
ErrorDocument 404 /404.html
# sets cache header for most static files, max-age is set to one day
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico|pdf)$">
Header set Cache-Control "max-age=86400, public"
</filesMatch>