2012-02-03 63 views
0

我的工作在工作网站上,并recenctly通过svn我的LocalServer移动它,这样我可以在家里工作...代码Ignighter - 404的表现,但正确的响应

的设置就行,没有专业...但代码点火器发送404 Not Found页面以及正确的响应...

例如,我可以加载'localhost/home',它会触发我的控制器,我得到正确的视图,但CI也发送404在页面的标题.... !! 这也发生在我的js文件...

我可以迫使它发送“200 OK”,但在每一页上的接缝傻这样做..

有没有人来翻过这个问题... ?

我正在使用; 代码Ignighter:2.1.0

的Apache:2.0.63

PHP:5.1.6

这是我的.htaccess

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ /index.php/$1 [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

RewriteCond $1 !^(index\.php|images|robots\.txt|css|js) 
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule> 

<IfModule !mod_rewrite.c> 
ErrorDocument 404 /index.php 
</IfModule> 
+0

#1裁切掉从我的htaccess的IfModule mod_rewrite.c但我有他们真的 – 2012-02-03 09:19:55

+0

您使用的是wiredesignz HMVC扩展? – 2012-02-03 20:09:56

回答

1

给这个的.htaccess例如from the documentation一试:

RewriteEngine on 
RewriteCond $1 !^(index\.php|images|robots\.txt) 
RewriteRule ^(.*)$ /index.php/$1 [L] 

以下行可能会对您负责[R 404响应:

ErrorDocument 404 /index.php 
+0

如果我按照原样使用它,我会在所有内容上出现错误500 ....?!但是当我把它放在一个“如果模块”等。它显示了以前的耻辱......? – 2012-02-03 09:59:48

+1

错误500是内部服务器错误,您是否在本地计算机上设置了mod_rewrite?试试phpinfo()。 – 2012-02-03 10:21:11

相关问题