top-think / framework

ThinkPHP Framework
http://www.thinkphp.cn
Other
2.72k stars 1.06k forks source link

ThinkPHP 5.1路由BUG #1901

Closed WangBaoJing closed 5 years ago

WangBaoJing commented 5 years ago

5.1路由开启完全匹配时,url若以斜杠结尾则报“当前访问路由未定义或不匹配”的错误。

BUG复现: 路由为“Route::get('admin/verify', 'admin/Account/verify');”, 域名为“http://test.cn”, 访问“http://test.cn/admin/verify”正常, 但访问“http://test.cn/admin/verify/”时报错

经测试,5.0和6.0dev均无此BUG,望尽快解决。

liu21st commented 5 years ago

本来这就是两个不同的路由,定义路由的时候使用removeSlash方法即可

WangBaoJing commented 5 years ago

@liu21st 辛苦了,感谢回复,谢谢!