【发布时间】:2011-10-01 01:25:03
【问题描述】:
我正在部署我们在实时服务器中创建的 Web 应用程序,但是我在弄清楚如何删除 index.php 时遇到了麻烦。 我已经阅读了几篇关于如何在 codeigniter 应用程序中删除 index.php 的博客。
我已在我的 .htaccess 上尝试过此设置
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
在我的 config.php 上
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
但我仍然不知道如何删除它。我需要在 apache httpd.conf 中编辑一些东西吗?
谢谢!
【问题讨论】:
-
你的 apache 服务器上启用了 mod_rewrite 吗?
标签: php apache codeigniter