+ -
当前位置:首页 → 问答吧 → .htaccess伪静态分页不能去掉index.php

.htaccess伪静态分页不能去掉index.php

时间:2011-11-07

来源:互联网

伪静态分页不能去掉index.php,其他一切正常。.htaccess规则采用官方规则
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

进入列表的时候,分页链接就带上了index.php,伪静态就失效了。
第一次点击分页的时候,能正常浏览,分页地址类似于http://www.meiwu1986.com/index.php/Product/index/p/2.html
但是这个页面再次生成的分页地址就错误了,类似于http://www.meiwu1986.com/index.php/index.php/Product/index/p/3.html

不知道说清楚没?没清楚的麻烦点几下http://www.meiwu1986.com/Product/index.html 实地考察下吧。
以前用的IIS的伪静态都是正常的,这次换成APACHE就成这样了。

作者: puzhangyi   发布时间: 2011-11-07

算了,还是我自己改分页代码实现了。

作者: puzhangyi   发布时间: 2011-11-07