Php DreamHost和CodeIgniter htaccess

Php DreamHost和CodeIgniter htaccess,php,.htaccess,codeigniter,dreamhost,Php,.htaccess,Codeigniter,Dreamhost,我有一个CodeIgniter应用程序,它成功地部署在localhost和justhost上,没有任何错误。现在,我需要迁移到DreamHost并将其放置在子目录中:现在应用程序给我这个旧htaccess文件的“未指定输入文件”错误: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILEN

我有一个CodeIgniter应用程序,它成功地部署在localhost和justhost上,没有任何错误。现在,我需要迁移到DreamHost并将其放置在子目录中:现在应用程序给我这个旧htaccess文件的“未指定输入文件”错误:

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
当我通过在RewriteRule index.php之后添加问号来改变这一点时,它可以工作:

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
但是,有一个问题是,我无法再通过$u post和$this->input->post()接收post数据


这个问题的解决方案是什么?DreamHost真的很烦人…

如果url要符合
http://mywebsite.com/code_igniter_root/
确保已将config/config.php文件中的基本url设置为
http://mywebsite.com/code_igniter_root/
。您可能还需要再次更改htaccess,以获得子文件夹的帐户。类似于
^(.*)$code\u igniter\u root/index.php?/$1[L,QSA]
。谢谢,它现在可以工作了!那么非万维网和万维网是不同的?我怎样才能强迫用户进入非www的1个版本?如果你进入www域,它仍然不起作用?我认为这不应该被关闭。我认为标题措词不当,@Jeemusu应该给出答案而不是评论。但这也是我正在经历的一个合理的问题。