Home >Backend Development >PHP Tutorial >thinkphp5 - thinkphp路由

thinkphp5 - thinkphp路由

WBOY
WBOYOriginal
2016-06-06 20:09:371293browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn