rewrite non SSL to SSL Print

  • 29

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

Was this answer helpful?

« Back