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:
parent
4ccc748312
commit
f7abac6c21
@ -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, '/');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user