From f5e4af9b533bae5a0e70f4ae7d468d44db98f92d Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 14 Feb 2012 18:08:45 +0000 Subject: [PATCH] Properly redirect to install.php when visiting wp-login.php with a config file but no db. Props SergeyBiryukov. fixes #18397 git-svn-id: http://svn.automattic.com/wordpress/trunk@19923 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a5975f12f..bd3a02475 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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, '/'); }