Skip to content

Instantly share code, notes, and snippets.

@odracci
Forked from stefanosala/gist:3881637
Last active December 10, 2015 01:18
Show Gist options
  • Save odracci/4356918 to your computer and use it in GitHub Desktop.
Save odracci/4356918 to your computer and use it in GitHub Desktop.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName dev.lan
ServerAlias *.dev.lan
DocumentRoot /Users/rick/projects/php
<Directory /Users/rick/projects/php>
#AllowOverride All
AllowOverride None
Allow from All
</Directory>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/sf/
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev\.lan
RewriteCond /Users/rick/projects/php/%1/web -d
RewriteRule ^.*$ - [L]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev\.lan
RewriteCond /Users/rick/projects/php/%1/web -d
RewriteCond /Users/rick/projects/php/%1/web/%{REQUEST_URI} -s [OR]
RewriteCond /Users/rick/projects/php/%1/web/%{REQUEST_URI} -l [OR]
RewriteCond /Users/rick/projects/php/%1/web/%{REQUEST_URI} -d
RewriteRule ^(.*) /%1/web/$1 [L]
RewriteCond %{REQUEST_URI} ^/.+_dev\.php
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev\.lan
RewriteCond /Users/rick/projects/php/%1/web -d
RewriteRule ^(.*) /%1/web/$1 [L]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev\.lan
RewriteCond %{REQUEST_URI} !^/.+_dev\.php
RewriteCond /Users/rick/projects/php/%1/web -d
RewriteCond /Users/rick/projects/php/%1/web/index.php -s
RewriteRule ^(.*)$ /%1/web/index.php/$1 [QSA,L]
LogLevel debug
<Location />
SetInputFilter DEFLATE
</Location>
Alias /sf /Users/rick/libs/symfony/current/data/web/sf
<Directory "/Users/rick/libs/symfony/current/data/web/sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment