Created
August 18, 2013 06:03
-
-
Save bryanwillis/6260138 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
<?php | |
// add this to your php.ini | |
// auto_prepend_file = /path/to/virtual.prepend.php | |
$http_host = explode('.',$_SERVER['HTTP_HOST']); | |
$__mod_vhost_alias_fix_doc_root = $_SERVER['DOCUMENT_ROOT'] . | |
DIRECTORY_SEPARATOR . $http_host[0] . | |
DIRECTORY_SEPARATOR . 'public'; | |
if (is_dir($__mod_vhost_alias_fix_doc_root)) { | |
$_SERVER['DOCUMENT_ROOT'] = $__mod_vhost_alias_fix_doc_root; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment