Created
November 5, 2018 16:22
-
-
Save getdave/d7a0c96aeafcf238869bf8cc500119ca to your computer and use it in GitHub Desktop.
Redirect website including all sub dirs to equivalent on new domain with query string identifier
This file contains hidden or 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} ^source-domain.com [NC,OR] | |
RewriteCond %{HTTP_HOST} ^www.source-domain.com [NC] | |
RewriteRule ^(.*)$ https://target-domain.com/$1?source=sourcedomain [L,R=302,NC] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment