Created
September 10, 2008 04:26
-
-
Save trey/9822 to your computer and use it in GitHub Desktop.
Redirecting a domain using a VirtualHost file.
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
<VirtualHost *:80> | |
ServerName example.com | |
ServerAlias www.example.com | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC] | |
RewriteRule ^(.*)?$ http://new-example.com$1 [R=301,L] | |
</VirtualHost> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment