Properly redirect to install.php when visiting wp-login.php with a config file but no db. Props SergeyBiryukov. fixes #18397

git-svn-id: https://develop.svn.wordpress.org/trunk@19923 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-02-14 18:08:45 +00:00
parent 4ccc748312
commit f7abac6c21
1 changed files with 1 additions and 1 deletions

View File

@ -3048,7 +3048,7 @@ function wp_guess_url() {
$url = WP_SITEURL;
} else {
$schema = is_ssl() ? 'https://' : 'http://';
$url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
$url = preg_replace('#/(wp-admin/.*|wp-login.php)#i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
return rtrim($url, '/');
}