HostOnNet Blog

Redirect web site to SSL using .htaccess

Looking for Linux Server Admin or WordPress Expert? We can help.

To redirect web site to SSL using .htaccess, create .htaccess file with following content.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

For blog.hostonnet.com, i use following .htaccess

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://blog.hostonnet.com/$1 [R,L]

Posted in Windows

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.