最近我移动了一个magento 1.9,但api/rest url是404ing。
该站点在虚拟主机上的 php 7.0 上运行。
我已添加
<Directory /var/www/html/magento/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
但这不起作用:/
我还
为RewriteRule ^api/rest api.php?type=rest [QSA,L]
api/rest 在我的本地版本上运行良好,但在实时服务器上无法正常工作。
对此的任何帮助都将是上帝派来的:)
解决方案
在 .conf 文件中,我需要删除Options Indexes FollowSymLinks
<Directory /var/www/html/magento>
AllowOverride All
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
希望这对:)有所帮助
确保使用Options -MultiViews
而不是Options FollowSymlinks
。