Monthly Archives: June 2018

Redirecting HTTP to HTTPS

Redirecting HTTP to HTTPS

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Redirect Only a Specific Domain

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Redirecting to HTTPS on a specific folder, add the following: