2018-12-15 13:04:49 +00:00
|
|
|
# Serve .html files without extensions
|
|
|
|
Options +MultiViews
|
|
|
|
# If a SVG and a PNG exists the prefer the SVG
|
2018-12-16 10:05:32 +00:00
|
|
|
AddType image/svg+xml;qs=0.9 svg sgvz
|
2018-12-15 13:04:49 +00:00
|
|
|
AddType image/png;qs=0.8 png
|
|
|
|
# Work around Apache bug from 2002
|
|
|
|
# https://bz.apache.org/bugzilla/show_bug.cgi?id=53595
|
|
|
|
# https://kevinlocke.name/bits/2012/07/20/serving-xhtml-with-apache-multiviews/
|
|
|
|
Header always edit "Content-Type" ";\s*qs=[0-9]*(?:\.[0-9]+)?\s*" ""
|
2018-12-16 10:05:32 +00:00
|
|
|
# Gzip these file types
|
|
|
|
AddOutputFilter DEFLATE html
|
2018-12-16 12:01:01 +00:00
|
|
|
AddOutputFilter DEFLATE svg
|
2018-12-15 13:04:49 +00:00
|
|
|
AddOutputFilter DEFLATE css
|
|
|
|
AddOutputFilter DEFLATE js
|
2019-06-20 16:47:38 +00:00
|
|
|
# URL's that changed
|
|
|
|
Redirect /coops/ https://www.coops.tech/co-op/
|
2019-07-05 14:01:40 +00:00
|
|
|
Redirect /technology/gnu-bash https://www.coops.tech/technology/bash
|
2019-06-20 06:03:25 +00:00
|
|
|
# Canonical URLs redirect to the domain with a www
|
|
|
|
<IfModule mod_rewrite.c>
|
2019-06-20 06:05:19 +00:00
|
|
|
RewriteEngine on
|
2019-06-20 06:03:25 +00:00
|
|
|
RewriteCond %{HTTP_HOST} ^coops\.tech$
|
|
|
|
RewriteRule ^/?(.*) https://www.coops.tech/$1 [R,L]
|
2019-06-20 06:07:38 +00:00
|
|
|
</IfModule>
|
2019-06-20 06:03:25 +00:00
|
|
|
# Redirect HTTP to HTTPS
|
|
|
|
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteEngine on
|
|
|
|
RewriteCond %{HTTPS} !=on
|
|
|
|
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
|
|
|
</IfModule>
|
|
|
|
# Strict Transport Security Header, this prevents clients
|
|
|
|
# with STS support from accessing the site using HTTP
|
|
|
|
# https://stackoverflow.com/questions/24144552/how-to-set-hsts-header-from-htaccess-only-on-https
|
|
|
|
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
|