我試圖從url中刪除index.php部分。 這裏是我的.htaccess文件從URL中刪除index.php時出現「內部服務器錯誤」
RewriteEngine On
RewriteBase /faraztest
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
我也改變了config.php文件,但它仍然寫着「內部服務器錯誤」當我把網址中刪除「/index.php/」後去除。請幫忙。
當你在瀏覽器中輸入沒有'/ index.php'的url時,它會保留嗎? – 2014-11-01 18:16:24
不,當我把規定的代碼放在.htaccess文件中時,我甚至不響應localhost/project /並給出這個錯誤 – 2014-11-01 18:23:00
試着在[0123]結尾 – 2014-11-01 22:22:09