Home > Backend Development > PHP Tutorial > thinkphp分组问题求助

thinkphp分组问题求助

WBOY
Release: 2016-06-23 14:27:44
Original
1071 people have browsed it

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

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

现在的情况是,访问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

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