Apache_Web服务器上的$ _GET [“ _ url”]无法正常工作

时间:2019-03-23 12:43:17

标签: php xampp apache2

我目前正在使用PHP开发REST API。因此,我在Windows 10 PC上设置了XAMPP,到目前为止,它可以按预期运行。

要访问REST端点,我必须打开https://<PC IP>/Api/ExampleEndpoint。现在ExampleEndpoint保存在变量$_GET["_url"]中,我可以在浏览器中看到该端点的内容。

现在,我在Raspberry PI上的Apache2 Web服务器上尝试了相同的操作,但是在浏览器(https://<RASP-IP>/Api/ExampleEndpoint)中访问相同的端点时,我得到了 404 Not Found-请求的URL / Api /服务器在此服务器上找不到该。如果我在URL(https://<RASP-IP>/Api?_url=ExampleEndpoint)中将Parameter作为GET变量明确提供,则可以正常工作。

是否可以使用与Windows上的XAMPP相同的URL语法?


  • PC:Win10,XAMPP,PHP7.3.3
  • Raspberry PI:Debian Stretch,Apache2 Web服务器,PHP 7.0.33-0 + deb9u3

0 个答案:

没有答案