diff --git a/src/think/route/RuleGroup.php b/src/think/route/RuleGroup.php index c36bf4d7bc..0b2fd22042 100644 --- a/src/think/route/RuleGroup.php +++ b/src/think/route/RuleGroup.php @@ -234,7 +234,7 @@ protected function checkUrl(string $url): bool $str = $this->fullName; } - if ($str && 0 !== stripos(str_replace('|', '/', $url), $str)) { + if ($str && 0 !== stripos(rtrim(str_replace('|', '/', $url), '/') . '/', rtrim($str, '/') . '/')) { return false; } }