Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created Oct 18, 2018
Embed
What would you like to do?
Redirect 301 from old domain to new domain HTTPS
# Redirect from old domain to new domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ https://www.newdomain.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment