Thursday, 19 December 2019

http to https redirection using .htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.website.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.website.com/$1 [L,R=301]

No comments:

Post a Comment