我在我的項目中使用了坦克驗證。在我的本地主機,它工作正常。但是,當我上傳的項目到服務器上,我得到了錯誤的Htaccess不能在Codeigniter中工作
沒有指定輸入文件。
我知道這是因爲htaccess。我的網址就像http://example.org/project/test/tankauth/。當我給這個URL時,它將重定向到http://example.org/project/test/tankauth/index.php/auth/login並顯示錯誤。但是,如果我嘗試使用像http://example.org/project/test/tankauth/index.php?/auth/login這樣的網址,它將正常工作。
我htaccess文件如下圖所示:
RewriteEngine on
RewriteBase /tankauth/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
我不是htaccess的好。
檢查mod_rewrite的是啓用或不? –
是啓用 – Jenz
更改'$ config ['index_page'] ='index.php';'爲'$ config ['index_page'] =';;' – dhidy