Created
March 8, 2013 12:54
-
-
Save antonlindstrom/5116308 to your computer and use it in GitHub Desktop.
Rewrites to HTTPS and domain mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config_extra => [ | |
'RewriteEngine On', | |
'RewriteMap domains txt:/etc/apache2/domains.txt', | |
"RewriteCond %{HTTP_HOST} !${::ipaddress_eth1}|${::fqdn}", | |
'RewriteRule ^/$ ${domains:%{HTTP_HOST}} [NC,L,R=301]', | |
'RewriteCond %{HTTPS} off', | |
'RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC]', | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment