Created
February 26, 2012 23:04
-
-
Save robmint/1919516 to your computer and use it in GitHub Desktop.
Many virtual hosts under one 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
NameVirtualHost * | |
<VirtualHost *> | |
ServerName fruit.com | |
DocumentRoot /www/html/htdocs/fruitsite/docroot | |
</VirtualHost> | |
<VirtualHost *> | |
ServerName www.apple.com | |
ServerAlias www.banana.com www.cherry.com | |
RewriteEngine On | |
RewriteRule ^(.*)$ http://fruit.com$1 [R=301,L] | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment