Redirect web site to SSL using .htaccess

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