Last active
December 19, 2015 13:59
-
-
Save simodima/5966281 to your computer and use it in GitHub Desktop.
Symfony2 virtualhost
This file contains hidden or 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
<VirtualHost *:80> | |
DocumentRoot /path/to/symfony/web | |
ServerName booking.local | |
<Directory /path/to/symfony/web > | |
Options FollowSymLinks | |
AllowOverride All | |
Allow from all | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ | |
RewriteRule ^app_\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule .? - [L] | |
RewriteRule .? %{ENV:BASE}/app_dev.php [L] | |
</IfModule> | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment