1

为了使用 magento rest api,我做了以下事情。

在窗口中

  • 使用 oauth 安装了 magento 1.7 CE(在 phpinfo 中检查)。
  • 创建用户角色并为来宾用户授予所有权限。
  • 后来尝试通过URL访问其余资源

    http://localhost:8036/magento/index.php/api/products/?type=rest http://localhost:8036/magento/api/products/?type=rest http://localhost:8036/magento/api/rest/products/

    none of them worked. What can I do now? Any kind of help is appreciated. I have followed all the magento guidelies for REST.

In Ubuntu

  • done the same settings
  • while accessing the rest resource via

    http://10.211.20.26/magento/api/rest/products/

    未找到

    在此服务器上找不到请求的 URL /magento/api/rest/products/。

我的两个 magento 安装中都有产品。

4

1 回答 1

2

看来你的重写坏了。我假设您正在运行 Apache HTTPd,因此请检查 Magento 安装根目录中的 .htaccess 并确保您的重写工作正常。您可以通过取消注释相应的行来做到这一点。请使用 RewriteLog 和 RewriteLogLevel 指令将日志记录添加到重写引擎。

于 2013-10-08T22:30:49.203 回答