当前位置:Gxlcms > PHP教程 > thinkphp分组问题求助

thinkphp分组问题求助

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

本帖最后由 xiongmzh 于 2013-11-20 15:24:09 编辑

我的分组: A B C
默认分组: A
b.xxx.com,指向组B, .htaccess如下;
Options +FollowSymLinksRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/B/$1 [QSA,PT,L]

现在的情况是,访问http://b.xxx.com/的时候,却是执行的是A分组下的IndexAction控制器中的index方法(但是地址栏中的url没变),求助,一直没想通啥原理,为什么不是执行的B组下面的IndexAction控制器


回复讨论(解决方案)

呃 我知道怎么回事了,压根儿没执行到RewriteRule ^(.*)$ index.php/B/$1 [QSA,PT,L]

但是当我访问http://b.xxx.com/index 也是执行的A组的IndexAction,这我就想不通了啊

访问http://b.xxx.com/index的时候 ,在入口文件中输出server,发现没有REDIRECT_STATUS,说明没有重写成功

http://b.xxx.com/
http://b.xxx.com/Index
http://b.xxx.com/Index/index
http://b.xxx.com/Index/index.html
这些都没重写成功,第一个没成功,还可以理解,但是第二三四个就百思不得其解了,更不能理解的是,下面的却能重写成功:
http://b.xxx.com/Other
http://b.xxx.com/Other/index
http://b.xxx.com/Other/index.html

人气教程排行