Forcing Your Site To Use HTTPS (enforcing SSL)

Indra Design HQ has been working installing a lot more SSL certificates lately. This is due to more people are recognizing the importance of having a secure connection on their website.

Having an SSL certificate means that all online communications to/from your webserver are encrypted. Without encryption, your password that you typed in the login form (on your website) can be read in plain text by other people!

That is similar to writing down your precious password on a piece of paper and throwing it down an alley. Sooner or later it will be picked up by someone.

As for the main point of this piece of writing, useful for developers, is a simple way to force your site to use the HTTPS protocol (and use the SSL certificate which has been installed).

Have a line in your .htaccess file that says:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
This entry was posted in Blog, News Updates. Bookmark the permalink.

Comments are closed.