 <p>Yes. People normally just use VirtualHosts. </p> <p>There are several ways. </p> <ul> <li>You can use a relative path to include a config file. </li> <li>You can use a DOCUMENT_ROOT from the $_SERVER superglobal to place a config file there. </li> <li>You can use web-server config if possible. like <code>php_value auto_prepend_file</code> in .htaccess </li> <li>And at least you can detect your environment and choose between two roots, both written in conditions at the top. </li> <li>And yes, if you're using mod_rewrite - make a front controller which will include all the other files, so - the only one file to place these settings.</li> </ul>