【问题标题】:How do we make the cs cart api work after installation?我们如何在安装后使 cs cart api 工作?
【发布时间】:2018-12-26 13:42:08
【问题描述】:

我在新服务器上安装了 cs cart 并启用了 API 用户访问。但是 api 正在返回 404 not found 错误。不确定这里需要什么。

谁能帮忙!!

【问题讨论】:

  • 请分享更多细节。你是如何使用 API 的?你能分享一些代码吗?

标签: cs-cart


【解决方案1】:

请尝试yoursite.com/api.php?_d=products(例如在浏览器中)

如果可行,请确保 .htaccess 根文件(用于 apache 服务器)包含以下行:

RewriteCond %{REQUEST_URI} ^api/(.*)$ [or]
RewriteCond %{REQUEST_URI} .*/api/(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*api/(.*)$ api.php?_d=$1 [L,QSA]

这可能意味着 mod_rewrite 在服务器上未配置或配置不正确

附言如果服务器在 nginx 上,则需要模拟配置

【讨论】:

    【解决方案2】:
    1. 为管理员用户启用 API

    1. 遵循文档

      https://docs.cs-cart.com/4.9.x/developer_guide/api/index.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-28
      • 2022-01-22
      • 2021-06-24
      • 1970-01-01
      • 2021-06-22
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多