[Pro] SSL and Freeway Pro

In case it’s of interest, the hoffkids rewrite conditions and rules in James’ earlier code can be made domain agnostic like this:

# Turn RewriteEngine on, only do this once
RewriteEngine On

# If HTTPS & www, redirect to non-www
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301]

# If not HTTPS, whether www or not, redirect to HTTPS non-www
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^(www.)?(.*)$ [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%2/$1 [R=301]

Simon


freewaytalk mailing list
email@hidden
Update your subscriptions at: