【发布时间】:2011-10-28 04:45:52
【问题描述】:
我最近开始使用 codeigniter,并将它托管在 Bluehost 上:http://dev.fuelingtheweb.com/codeigniter/。
如果我在这样的路径中包含 index.php:/codeigniter/index.php/hello,一切正常,但是如果我尝试访问没有 index.php 的页面,像这样:/codeigniter/hello,我得到500 内部服务器错误。我尝试了许多 .htaccess 选项,但似乎没有任何效果。
目前,我的 .htaccess 文件位于:/codeigniter/.htaccess,它包含以下代码:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /codeigniter/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ codeigniter/index.php/$1 [NC,L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
另外,我的配置文件(/codeigniter/application/config/config.php)包括以下内容:
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
我尝试了所有 5 个协议选项,但均未成功。
对此的任何帮助将不胜感激。
【问题讨论】:
标签: .htaccess codeigniter bluehost