From 0c8fe001e5096ea588c1c5799dae6dfa10c45e6e Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Tue, 31 Dec 2024 16:39:53 +0800 Subject: [PATCH] =?UTF-8?q?url=E6=A8=A1=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/common.php b/app/common.php index e1056051c..6134e1d25 100755 --- a/app/common.php +++ b/app/common.php @@ -2863,7 +2863,11 @@ function MyUrl($path, $params = []) // 非index.php,admin路径并且非index.php,api路径,install路径,兼容模式 if($script_name != 'index.php' || ($is_admin && $script_name != 'index.php') || $is_api || $is_install || $url_model == 0) { - $url = str_replace($script_name.'/', $script_name.'?s=', $url); + // 仅index端处理为兼容模式 + if(!$is_index) + { + $url = str_replace($script_name.'/', $script_name.'?s=', $url); + } // 前端模式,短地址模式(无路径则是短地址) if($script_name == 'index.php' && stripos($url, $url_path) === false)