1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2026-02-21 11:02:03 +00:00

More dynamic .htaccess

This commit is contained in:
Holger Just 2015-12-07 20:56:38 +01:00
parent 6fd9b10497
commit 6524023e9b

View File

@ -1,5 +1,6 @@
---
noindex: true
layout: false
---
# Compress files on the fly
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript
@ -17,4 +18,8 @@ RewriteEngine On
# Require SSL
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteRule .* https://<%= URI.parse(casper[:blog][:url]).host %>%{REQUEST_URI} [R=301,L,QSA]
# Ensure we only use the canonical hostname
RewriteCond %{HTTP_HOST} !=<%= URI.parse(casper[:blog][:url]).host %> [NC]
RewriteRule .* https://<%= URI.parse(casper[:blog][:url]).host %>%{REQUEST_URI} [R=301,L,QSA]