我已經開始使用codeigniter,並且想要移除在/testing_palace/index.php/home
到/testing_palace/home
之間工作的localhost中的index.php
。.htaccess在codeigniter中不起作用
我google'ed這個問題,並嘗試提出的解決方案,但沒有爲我工作。
我在配置改變base_url
和索引頁
$config['base_url']= 'http://localhost/testing_palace/';
$config['index_page'] ="";
,並啓用了Windows下的Apache檢查mod_rewrite
。
這裏是我的.htaccess代碼
RewriteEngine On
RewriteBase /testing_palace
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
所有這些解決方案是不是爲我工作越來越沒有發現錯誤。
你錯過了在規則斜線,它應該是'RewriteBase/testing_palace/' – Prix 2014-10-28 06:13:13
謝謝你的迴應,我試過它不適合我。 – 2014-10-28 06:19:00
@Mohit Jain我檢查了mod_rewrite已啓用,並遵循你給它不適合我的步驟.. – 2014-10-28 06:31:57