我正在研究一個PHP web應用程序,它會將每個傳入請求路由到與WordPress或Joomla相同的index.php。Apache重寫不能在自定義擴展上工作
以下.htaccess用於實現該功能。
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
據工作WAMP的服務器的[Windows]和IIS,但是,當我遷移應用Ubuntu的02年4月16日[阿帕奇2.4.18,php7.0.18,谷歌雲引擎],它停止了一些工作自定義擴展文件。它仍然在正常的php文件上工作。
我創建了一個名爲service的文件夾來放置web服務的php文件,並將文件命名爲****。svc.php並與****。svc url一起使用。它之前工作正常,但它不在Ubuntu上,並顯示以下錯誤。
Not Found
The requested URL /service/retrieve_opened_rs.svc was not found on this server.
Apache/2.4.18 (Ubuntu) Server at ******* Port 80
我相信這是配置問題,但我仍然無法弄清楚3天后如何修復。請幫幫我。提前致謝。
工作就像一個魅力。謝謝!!! –