$installPath = 'cms'; if (preg_match("~^\/$installPath\/~", $_SERVER['REQUEST_URI'])) { define('WP_USE_THEMES', true); require( dirname( __FILE__ ) . "/$installPath/wp-blog-header.php" ); exit; }