redirect "http://" to "https://" on plane html website

Redirect from http to https (basic html site)

It is very simple to acheive that by opening your website .htaccess file and adding the below code to it, then save the file. then simple hard refresh your browser nad see the result.

<IfModule mod_rewrite.c>

RewriteEngine On 

RewriteCond %{SERVER_PORT} 80 

RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

</IfModule>

 

  • 0 Users Found This Useful
這篇文章有幫助嗎?

相關文章

How to link a domain name into a hosting server using DNS nameservers

In order to link your domain (no matter where it is reserved with any registrar) to a new hosting...

Powered by WHMCompleteSolution