From 7c09214962a62a680f9b4658babd8ddcb9813d87 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 26 Jul 2016 12:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRuoute=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 2 +- library/think/Route.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index 01d8a32b..01614917 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -468,7 +468,7 @@ class App */ public static function routeCheck($request, array $config) { - $path = rtrim($request->path(), '/'); + $path = $request->path(); $depr = $config['pathinfo_depr']; $result = false; // 路由检测 diff --git a/library/think/Route.php b/library/think/Route.php index 1128782e..8dc5c4e5 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -682,7 +682,7 @@ class Route if ('/' != $depr) { $url = str_replace($depr, '/', $url); } - + $url = '/' != $url ? rtrim($url, '/') : $url; if (strpos($url, '/') && isset(self::$rules['alias'][strstr($url, '/', true)])) { // 检测路由别名 $result = self::checkRouteAlias($request, $url, $depr);