当前位置:Gxlcms > PHP教程 > thinkphp5-thinkphp路由

thinkphp5-thinkphp路由

时间:2021-07-01 10:21:17 帮助过:26人阅读

thinkphp路由会根据规则进行重定向,不得不说有时候uri很难看。
但是有没有办法实现路径上的不重定向。
比如\think\Route::register('abc','/about/abc');
有没有办法实现访问example.com/abc等效于example.com/about/abc(不进行重定向)
之前忘记说了thinkphp5.0

回复内容:

thinkphp路由会根据规则进行重定向,不得不说有时候uri很难看。
但是有没有办法实现路径上的不重定向。
比如\think\Route::register('abc','/about/abc');
有没有办法实现访问example.com/abc等效于example.com/about/abc(不进行重定向)
之前忘记说了thinkphp5.0

多看文档,
http://www.kancloud.cn/manual/thinkphp/1707

人气教程排行