2017-04-03 71 views
0

刪除的index.php這是我WAMP /網絡/的.htaccess如何從笨路徑

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

# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request 
RewriteCond %{REQUEST_METHOD} OPTIONS 
RewriteRule ^(.*)$ $1 [R=200,L] 
**strong text** 

但錯誤顯示 所請求的網址/ CI /公/註冊在此服務器上找到。

的Apache/2.4.10(Win64中)PHP/5.5.12 Server將在:: 1端口80 是什麼問題..我也從config.php文件刪除的index.php ..

+0

的可能的複製取代

$config['uri_protocol'] ="AUTO" 

tp://stackoverflow.com/questions/34714792/htaccess-codeigniter-500-internal-server-error) –

+0

那麼現在該怎麼辦? –

+0

或甚至你可以看到[Codeigniter上的文檔](http://stackoverflow.com/documentation/codeigniter/929/getting-started-with-codeigniter/3068/installation-and-setup#t=201704031511502165007) –

回答

1

嘗試以下

打開config.php文件,並做以下內容替換

$config['index_page'] = "index.php" 

$config['index_page'] = "" 

在某些情況下,uri_protocol的默認設置無法正常工作。 [ - 500內部服務器錯誤的.htaccess笨(HT只是

$config['uri_protocol'] = "REQUEST_URI" 

的.htaccess

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
+0

仍然是相同的錯誤 –

+0

@MuhammadAhsanAyazKhan嘗試在另一個瀏覽器!這應該工作。 – Bhaskar

+0

注意codeigniter 3版本+沒有uri_protocol自動 – user4419336

0

的.htaccess

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

同樣的問題..你可以加入團隊查看器來檢查? –

+0

請發送您的項目.htacess代碼截圖。 – Gaurav