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]

Leave a Reply

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