Force https://www. conections to your site

You must have a secure cert on your site to use the following code.

Put the following at the top of a file called .htaccess , if you do not have one create the file.

# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L]

  • 30 Users Found This Useful
Was this answer helpful?