现在的位置: 首页 > 综合 > 正文

去除虚拟路径中的多余index.php

2014年01月01日 ⁄ 综合 ⁄ 共 181字 ⁄ 字号 评论关闭
在使用虚拟路径的时候,会发现路径形如http://localhost/vp/index.php/edit/id/1的url,但是如果不使用虚拟路径则是http://localhost/index/edit/id/1。
经过调研,发现是.htaccess中的路径重写规则有误。
正确的规则应该加上虚拟路径,如下:
  1. RewriteRule .* /vp/index.php

抱歉!评论已关闭.