RewriteEngine On
# these 2 lines takes requests on port 80 the default (not encypted) and forwards them to https://
RewriteCond %{SERVER_PORT} ^80
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

# these 2 lines add www to the url if it isn’t there
RewriteCond %{HTTP_HOST} ^tldomainname.com
RewriteRule ^(.*)$ https://www.tldomainname.com/$1 [R=permanent,L]

Sorry, the comment form is closed at this time.

© 2012 James Border Suffusion theme by Sayontan Sinha