Forum Discussion

pkeene's avatar
pkeene
New Contributor
6 years ago

How to automatically redirect http to https?

I recently installed an SSL Certificate to "http://www.mywebsite.com" address and now I need to have all traffic go to "https://www.mywebsite.com" how do I do that? Here is what I have so far but it doesn't seem to be working.

.htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
No RepliesBe the first to reply