Created
April 2, 2010 16:42
-
-
Save voxpelli/353353 to your computer and use it in GitHub Desktop.
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
# Dynamic Virtual Hosts | |
# get the server name from the Host: header | |
UseCanonicalName Off | |
# include the server name in the filenames used to satisfy requests | |
VirtualDocumentRoot /home/foobar/sites/%-2.0.%-1.0/public_html | |
# Activate mod_rewrite - which is not recommended! | |
<Directory /home/foobar/sites/> | |
AllowOverride FileInfo | |
</Directory> | |
# Remove "www." from domain names | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\. | |
RewriteRule ^(.*) %{HTTP_HOST}`$1 [C] | |
RewriteRule ^www\.([^\_]*)\`(.*)$ http://$1$2 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment