1
我已經請求的URL的 「http:// MYDOMAIN/testscripts/php_Env」爲什麼下面的apache htaccess代碼不會返回我的頁面?
我在testscripts文件夾中的文件php_Env.php ..
我htaccess的是如下
RewriteEngine On # Turn on the rewriting engine
RewriteCond %{REQUEST_FILENAME} !-f # Existing File
RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory
RewriteRule ^(php_([a-zA-Z_]+))$ $1.php [NC,L]
當運行它,瀏覽器返回我
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中?
你可以檢查服務器日誌嗎?你也想在你的規則之前加上'RewriteBase/testscripts /'。 – Ansari
仍給我同樣的錯誤 –
什麼是錯誤?檢查你的日誌 - 500錯誤將有一個原因。 – Ansari