rewrite non SSL to SSL

Want to force users to use SSL on your site?

Add this code to the top of your .htaccess file, edit our domain with your own.  This htaccess file should be at your site’s root directory, or the subdirectory if you prefer further customization and control.

WARNING:  Make a backup of your htaccess file so you can quickly fix your site if things go wrong such as typos!!

# BEGIN CODE
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://m3xs.net/$1 [R=301,L]
# END CODE – PLACE YOUR OTHER HTACCESS DIRECTIVES BELOW THIS ONE IF APPLICABLE

Note:  You only need one “RewriteEngine On” directive per htaccess file.

Keywords: backup, secure, socket, layer, subdirectory, control
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Domain redirect

So you bought another domain name that matches one you currently have.  You shouldn’t...

restrict by IP or password

I find myself tired of having to answer the pop up authentication box to view my control panel...

rewrite base

Top directories can break functionality on sub directories. Case in point:Scenario: WordPress...

Traffic source redirect

Need to redirect source traffic to another domain?  Well, if you can’t modify the link...

Restrict access by IP

WARNING:  Backup your current .htaccess file if you have one so you can quickly revert in...