Home > Backend Development > PHP Tutorial > Thinkphp url重写解决思路

Thinkphp url重写解决思路

WBOY
Release: 2016-06-13 12:00:24
Original
1067 people have browsed it

Thinkphp url重写
现在URL

localhost/think22/index.php/Home/Article/index/category/blog.html
Copy after login

想要匹配为
localhost/think22/index.php/Article/blog.html
Copy after login

应该怎么写?
 'URL_ROUTER_ON'   => true, //开启路由<br />    'URL_ROUTE_RULES' => array( //定义路由规则<br />        //求教<br />    )
Copy after login

------解决方案--------------------
'URL_ROUTER_ON'   => true, //开启路由
'URL_ROUTE_RULES' => array( //定义路由规则
    blog' => array('index/category/blog'),
), 

------解决方案--------------------
Home/Article/index/category/blog.html
这个url怎么解释?
Home 控制器
Article 方法名
后面是什么?

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template