Last active
May 30, 2017 02:01
-
-
Save cameronjonesweb/f64d344c67e717d9197d3ad2d7de9ba8 to your computer and use it in GitHub Desktop.
Redirect all from domain
This file contains 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 | |
# Replace example.com with the target domain | |
RewriteCond %{HTTP_HOST} !example.com$ [NC] | |
# Any paths you wish to exclude for some reason | |
RewriteCond %{REQUEST_URI} !^/training | |
# Preserve the path | |
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] | |
# All to the root | |
RewriteRule ^(.*)$ http://example.com/ [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment