2012-02-03 30 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

相關問題