Tag Archives: apache ssl redirect htaccess

Apache redirect non SSL to SSL

Customer writes:
“How do I redirect my site to the SSL secure site?”

Add this to your .htaccess file, or create one if you do not have one already (upload this to your site’s root directory).

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://my.m3server.com/

Now, when someone clicks or types in your URL, they will be taken to your secure URL.

Just replace my.m3server.com in the example above with your site’s domain name, and please test to ensure this is the action you are trying to achieve.

Travis