Home > php教程 > php手册 > The latest version of thinkphp5.0r4 streamlines URLs and is good for SEO.

The latest version of thinkphp5.0r4 streamlines URLs and is good for SEO.

WBOY
Release: 2016-08-10 08:49:03
Original
1326 people have browsed it

I discovered this when reading the manual. Some conflicts can be avoided. It is better to read the manual carefully.
You can add any route you want to set under this application/route.php, which is really convenient. I also put the verification code routing in this. return [<br> '__pattern__' => [<br>         'name' => 'w+',<br> ],<br> '[hello]' => [<br> ':id' => ['index/hello', ['method' => 'get'], ['id' => 'd+']],<br> ‘:name’ => ['index/hello', ['method' => 'post']],<br> ],<br> 'captcha/[:id]' => ['thinkcaptchaCaptchaController@index',['method'=>'get'], ['id' => 'd+']], /*Verification code routing*/ <br> // 'Captcha/[: ID]' = & GT; 'ThinkCaptchaCACACONTROLLER@Index',/*Verification code route*/<br> <br> 'zxzx/index' => 'zxzx/zxzx/index',<br> 'admin/admin' => 'zxzx/admin/admin',<br> 'zxzx/add' => 'zxzx/zxzx/add',<br> 'zxzx/edit' => 'zxzx/zxzx/edit',<br> 'zxzx/del' => 'zxzx/zxzx/del',<br> 'admin/profile' => 'zxzx/admin/profile',<br> 'admin/logout' => 'zxzx/admin/logout',<br> 'user/login' => 'zxzx/user/login',<br> 'user/login_captcha' => 'zxzx/user/login_captcha',<br> 'user/index' => 'index/user/index',<br> 'user/create' => 'index/user/create',<br> 'user/add' => 'index/user/add',<br> 'user/add_list' => 'index/user/addList', <br> 'user/update/:id' => 'index/user/update',<br> 'user/delete/:id' => 'index/user/delete',<br> 'user/:id' => 'index/user/read', ];

🎜
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template