【发布时间】:2011-02-15 18:15:08
【问题描述】:
这就是我的.htaccess 的样子。 .htaccess 位于/www/scripts 目录中,该目录是codeigniter 的system 目录的父目录,并且还包含index.php。我在我的 Apache 2.2.x 中启用了mod_rewrite。这是在 Ubuntu 9.10 服务器上。
我关注了这个link,但它不起作用。我需要在 apache2 中做些什么,任何特定的配置才能使其正常工作吗?
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
【问题讨论】:
-
当您在没有 index.php 的情况下访问您的网站时会发生什么?你得到什么错误?
-
如果您刚刚启用了 mod_rewrite,那么您可能只需要重新启动服务器。
标签: php .htaccess codeigniter url mod-rewrite