在使用虚拟路径的时候,会发现路径形如http://localhost/vp/index.php/edit/id/1的url,但是如果不使用虚拟路径则是http://localhost/index/edit/id/1。
经过调研,发现是.htaccess中的路径重写规则有误。
正确的规则应该加上虚拟路径,如下:
经过调研,发现是.htaccess中的路径重写规则有误。
正确的规则应该加上虚拟路径,如下:
- RewriteRule .* /vp/index.php