Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Implementing both HTTP and HTTPS 301 redirect to new secure a domain in htaccess for optimal SEO
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