Redirect to HTTPS with .htaccess

Put the following text in your .htaccess file and change it to match your domain.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://blog.hosting.guru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.hosting\.guru$
RewriteRule ^(.*)$ https://blog.hosting.guru/$1 [R=301,L]
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

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

*

code