Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created October 18, 2018 13:06
Show Gist options
  • Save fernandiez/53ecee2ff6e524e193421fa833dc9f09 to your computer and use it in GitHub Desktop.
Save fernandiez/53ecee2ff6e524e193421fa833dc9f09 to your computer and use it in GitHub Desktop.
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