From 4f92dbc170adc57c5297dd5530e8a2bdf4f74fd7 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 7 Jul 2017 11:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BUrl=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/response/Redirect.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/think/response/Redirect.php b/library/think/response/Redirect.php index f45b0e1c..373443ce 100644 --- a/library/think/response/Redirect.php +++ b/library/think/response/Redirect.php @@ -67,7 +67,11 @@ class Redirect extends Response */ public function getTargetUrl() { - return strpos($this->data, '://') ? $this->data : Url::build($this->data, $this->params); + if (strpos($this->data, '://') || (strpos($this->data, '/') && empty($this->params))) { + return $this->data; + } else { + return Url::build($this->data, $this->params); + } } public function params($params = [])