Redirect site to SSL using apache and .htaccess

Posted at December 22, 2015 at 2:16 pm by John Quaglieri

A quick way to redirect your site to ssl, from non ssl can be done in a .htaccess file on apache webservers with mod_rewrite. Open .htaccess in a text editor.

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]

replace with your domain. Using the rewrite rule ^(.*)$ anything included in the domain redirects to SSL. For example will redirect to

3.00 avg. rating (64% score) - 3 votes

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply