Created
October 18, 2011 11:16
-
-
Save wheresalice/1295188 to your computer and use it in GitHub Desktop.
Ensure people are using the www subdomain and https. This could be optimised, but it's nice to be able to switch out parts
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
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
php_value session.cookie_secure 1 | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteCond %{HTTPS}s ^on(s)| | |
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment