diff --git a/thinkphp/library/think/route/dispatch/Url.php b/thinkphp/library/think/route/dispatch/Url.php index 00dc8cca3..5160cba19 100755 --- a/thinkphp/library/think/route/dispatch/Url.php +++ b/thinkphp/library/think/route/dispatch/Url.php @@ -60,7 +60,7 @@ class Url extends Dispatch $controller = !empty($path) ? array_shift($path) : null; } - if ($controller && !preg_match('/^[A-Za-z][\w|\.]*$/', $controller)) { + if ($controller && !preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) { throw new HttpException(404, 'controller not exists:' . $controller); }