Return to Snippet

Revision: 26643
at May 5, 2010 09:34 by zachharkey


Initial Code
# Mass Virtual Hosting (mod_rewrite method)
<VirtualHost 127.0.0.1>
	ServerAlias *.dev
	RewriteEngine on
	RewriteCond %{HTTP_HOST} ^(.+).dev
	RewriteCond /Users/username/Sites/dev/%1/httpdocs -d
	RewriteRule ^(.*) /Users/username/Sites/dev/%1/httpdocs/$1 [L]       
	<Directory /Users/username/Sites/dev/*/httpdocs>
	    AllowOverride All
	</Directory>  
</VirtualHost>
<VirtualHost *:80>
	ServerAlias *.somecustom.dyndns.org
	RewriteEngine on
	RewriteCond %{HTTP_HOST} ^(.+).somecustom.dyndns.org
	RewriteCond /Users/username/Sites/dev/%1/httpdocs -d
	RewriteRule ^(.*) /Users/username/Sites/dev/%1/httpdocs/$1 [L]       
	<Directory /Users/username/Sites/dev/*/httpdocs>
	    AllowOverride All
	</Directory>  
</VirtualHost>   

Initial URL

                                

Initial Description

                                

Initial Title
Apache VirtualDocumentRoot Host with MAMP (mod_rewrite)

Initial Tags

                                

Initial Language
Other