<IfModule mod_rewrite.c>
RewriteEngine On
# Force removal of www RewriteCond % ^www\.(.+)$ RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# (Or force addition of www depending on your cert) RewriteEngine On RewriteCond % !^www\. RewriteRule ^(.*)$ http://www.%/$1 [R=301,L]
# Now Force traffic to use HTTPS RewriteCond % !443 RewriteRule ^(.*)$ https://securesiteurl.com/$1 [R=301,L]
</IfModule>
|