From 8a808a0d4b0cb9daa604f1542d7033cd8053bf63 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 11 Jan 2016 11:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Url.php b/library/think/Url.php index 2b0f1d0f..42e645b5 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -128,7 +128,7 @@ class Url $domain = $_SERVER['HTTP_HOST']; if (Config::get('url_domain_deploy')) { // 开启子域名部署 - $domain = 'localhost' == $domain ? 'localhost' : 'www' . strstr($_SERVER['HTTP_HOST'], '.'); + $domain = $_SERVER['HTTP_HOST']; foreach (Route::domain() as $key => $rule) { $rule = is_array($rule) ? $rule[0] : $rule; if (false === strpos($key, '*') && 0 === strpos($url, $rule)) {