Friday, 26 August 2022

HTTPS redirect with a .htaccess file

Full Redirect
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
 
Specific Domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

No comments:

Post a Comment