嗨我試圖從url中刪除.php
擴展名。爲此,我正在按照本教程remove .php extension。但是,當我的.htaccess
文件添加到目錄中,它顯示添加.htaccess使內部服務器錯誤
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
文件是:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
的哪些錯誤?
注意:我正在測試WAMP服務器中的所有文件。
是啓用了mod_rewrite? –
您是否檢查過'apache error log',使用wampmanager菜單來查看它,就像這個'left click wampmanager - > Apache - > Apache error log' – RiggsFolly