Created
May 31, 2016 05:49
-
-
Save laseoservice/c0e708bbb797812691f978a9bef5cbbc to your computer and use it in GitHub Desktop.
Implementing both HTTP and HTTPS 301 redirect to new secure a domain in htaccess for optimal SEO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^losangeles-seoservices\.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www\.losangeles-seoservices\.com$ | |
RewriteRule (.*)$ https://www.laseoservice.com/$1 [R=301,L] | |
RewriteEngine On | |
RewriteCond %{HTTPS} on | |
RewriteRule (.*)$ https://www.laseoservice.com/$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment