Created
October 16, 2014 21:40
-
-
Save John2496/a68ee6c7099734e1ffa7 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
<VirtualHost *:80> | |
RewriteEngine On | |
RewriteMap lowercase int:tolower | |
# if already rewitten and we have the right path, stop right here | |
#RewriteCond /var/www/vhosts/${lowercase:%{SERVER_NAME}/htdocs} !-d | |
#RewriteRule ^/(.*)$ /var/www/vhosts/_default/htdocs/$1 [L,E=VHOST_ROOT:/var/www/vhosts/_default/htdocs] | |
RewriteRule ^(/var/www/vhosts/[^/]+/.*)$ $1 | |
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 | |
##RewriteRule ^(.*).dev.(.*) $1.$2 | |
RewriteRule ^(.*)dev.(.*) $1$2 | |
RewriteRule ^(.*).dev(.*) $1$2 | |
RewriteRule ^(www\.)?([^/]+)/(.*)$ /var/www/vhosts/$2/htdocs/$3 [E=VHOST_ROOT:/var/www/vhosts/$2/] | |
Options +Indexes +FollowSymLinks | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment