Skip to content

Instantly share code, notes, and snippets.

@stefanosala
Created October 12, 2012 21:31
Show Gist options
  • Save stefanosala/3881637 to your computer and use it in GitHub Desktop.
Save stefanosala/3881637 to your computer and use it in GitHub Desktop.
My vhosts configuration
<VirtualHost *:80>
ServerName dev
ServerAlias *.dev
DocumentRoot /Users/stefanosala/Sites
SetEnv LocalDev true
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev
RewriteCond /Users/stefanosala/Sites/%1.dev/web -d
RewriteRule ^(.*) /%1.dev/web/$1 [L]
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev
RewriteCond /Users/stefanosala/Sites.dev/%1 -d
RewriteRule ^(.*) /%1.dev/$1 [L]
<Location />
SetInputFilter DEFLATE
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment