【发布时间】:2012-01-26 21:08:02
【问题描述】:
这是我的 .htaccess 文件:
RewriteEngine On
RewriteBase /projs/CodeIgniterTest
RewriteCond %{REQUEST_URI} !^/projs/CodeIgniterTest/index.php
RewriteRule ^(.*)$ index.php/$0
RewriteRule 工作正常,但我无法让RewriteCond 行与本地路径一起工作。我想让这个工作:
RewriteCond %{REQUEST_URI} !^index.php
但是,唉,%{REQUEST_URI} 不太关心RewriteBase 行,而是使用完整路径。有什么方法可以达到我想要的结果吗?我不想每次更改项目路径时都必须编辑 .htaccess 文件。
【问题讨论】:
标签: php apache .htaccess apache2