Home  >  Article  >  Backend Development  >  【ThinkPHP】怎么实现这样的重写 http://localhost/member/register => Home/MemberDo/register

【ThinkPHP】怎么实现这样的重写 http://localhost/member/register => Home/MemberDo/register

WBOY
WBOYOriginal
2016-06-13 11:59:221590browse

【ThinkPHP】如何实现这样的重写 http://localhost/member/register => Home/MemberDo/register

本帖最后由 default7 于 2014-05-19 22:31:35 编辑 版本:ThinkPHP 3.1.3
需求:
 http://localhost/member/register => /Home/MemberDo/register<br /> http://localhost/member/login => /Home/MemberDo/login<br /> http://localhost/u([a-z0-9]+)/info-(\d+).html => /Home/Info/detail?uname=$1&tid=$2
 


我的配置:已开启htaccess支持,配置文件已经开启 URL_ROUTE_ON 


然后我访问了 http://localhost/member/register 结果提示:非法操作:register


其实我想实现的就是把下面htaccess中的重写规则转换到 thinkphp中,如何才可以实现(default7#zbphp.com)



------解决方案--------------------
一个好的书写提示工具 可以节省不少时间
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