當我在我的本地機器上粘貼.htaccess
文件代碼時,它可以正常工作,就像我的網址沒有index.php
一樣正常,但是當我將相同的代碼上傳到linux服務器時,url再次需要index.php
有人指導我如何刪除Linux服務器上index.php
...Codeigniter在linux服務器中刪除index.php
這是我.htacces代碼
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
這是我的.htaccess代碼和我在我的本地Windows機器上解釋了這個做工精細但是當我上傳相同的代碼到Linux服務器,然後我的rounting引擎不起作用
檢查服務器上的mod_rewrite啓用 –
我們既沒有您的.htaccess文件,也沒有您的index.php文件,我們也沒有錯誤信息,我們怎麼可能知道哪裏出了問題? – sadaf2605
RewriteEngine敘述上 的RewriteCond $ 1→(索引\ .PHP |資源|機器人\ .TXT)!!! 的RewriteCond%{} REQUEST_FILENAME -f 的RewriteCond%{} REQUEST_FILENAME -d 重寫規則^ $ index.php文件(*)。/$ 1 [L,QSA] –