我在我的電腦上使用WAMP,並在編寫我的網站時,我決定刪除.html擴展名,以期提高美學效果。WAMP - 拖尾斜線(/)給出錯誤500「內部服務器錯誤」 - .htaccess錯誤?
這工作正常,所以,在我的情況下,temp.jakegriffin.co.uk/index.html成爲/索引,這是我想要的。不幸的是,如果有一個尾隨/索引之後,我得到:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
當我嘗試在.htaccess文件來解決這個問題,我要麼得到錯誤403是我禁止或錯誤404人的頁面不存在。
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
這是我用於去除擴展的.htaccess文件的代碼。如果有人可以幫助我,這將不勝感激。
在此先感謝, 傑克。
什麼呢Apache的錯誤日誌說..? –