只要访问index.php本身或任何REST服务(例如index.php / MyService),Slim PHP就会继续给我一个404 Not Found
我怀疑我的问题与我的.htaccess文件有关:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
目录结构:
My Slim index.php位于
下/var/www/api/v1/index.php
我的apache2.conf:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
我可以很好地执行任何其他PHP脚本(例如/api/v1/test.php)