From 0c5a475e13117a8fb87f8732f913c06bcc67b018 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 5 Jan 2016 10:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9F=9F=E5=90=8D=E9=83=A8?= =?UTF-8?q?=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/think/Route.php b/library/think/Route.php index d601f46d..00e9b6bd 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -238,6 +238,12 @@ class Route // 检测URL路由 public static function check($url, $depr = '/') { + // 检测域名部署 + self::checkDomain(); + + if (!empty(self::$bind)) { + $url = implode('/', self::$bind) . '/' . $url; + } // 优先检测是否存在PATH_INFO if (empty($url)) { $url = '/'; @@ -246,8 +252,6 @@ class Route if ('/' != $depr) { $url = str_replace($depr, '/', $url); } - // 检测域名部署 - self::checkDomain(); if (isset(self::$map[$url])) { // URL映射