Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
301 Redirect to new domain including Request URI
RewriteEngine on
# Exception for Google Verification
RewriteCond %{REQUEST_URI} !^/google-verification-file.html
# Exception Let's Encrypt Challenge
RewriteCond %{REQUEST_URI} !^/.well-known/
# 301 Redirect to New Domain incl. Request URI
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
RewriteEngine on
# 301 Redirect to New Domain incl. Request URI
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.