【发布时间】:2013-04-11 03:20:27
【问题描述】:
我在 ubuntu 12.10 上使用 apache2。但 htaccess 不工作,这是我的 htaccess 文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ci/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
$config['base_url'] = 'http://localhost/ci/index.php';
$config[‘index_page’] = “”;
$config[‘uri_protocol’] = “AUTO”;
1 http://localhost/ci/index.php/site/about
2 http://localhost/ci/site/about
第一个工作,但我希望第二个工作任何想法如何使它工作。谢谢
404 Not Found
The requested URL /ci/site/about was not found on this server.
【问题讨论】:
-
尝试删除 $config['base_url'] = 'localhost/ci/index.php';到 $config['base_url'] = ' '
-
还是一样的错误信息
标签: php .htaccess codeigniter