php - 在 PRESTASHOP 的多商店 URL 上找不到所有 CSS 和 JS 文件

标签 php friendly-url prestashop-1.6

我已在我的 prestashop 网站中启用了多商店选项。我还设置了一个名为“abc”的商店并设置了它的 url“http://example.com/abc” '.我的网站主页运行良好,但当我转到我的商店 url 时 'http://example.com/abc ' 它无法正确加载,因为它无法在 head 标记中找到所有 js 和 css 文件,并且显示 404 not found for all css and js file in consol. 那里可能有什么问题。?感谢您的提前帮助。

最佳答案

  1. 从配置文件夹中打开 vim config/settings.inc.php
  2. 找到包含 __PS_BASE_URI__ 设置的行,然后使用基本 URI 更新值。

    If you installed PrestaShop in the document root directory 
    (for example, public_html), 
    then the base URI is /. Alternatively, if you installed PrestaShop 
    in a subdirectory, 
    the base URI is /path, where path represents the folder name. 
    For example, the following line shows 
    the base URI set to the document root directory (/):
    
    define('__PS_BASE_URI__', '/');
    
    for subdirectory - define('__PS_BASE_URI__', '/directoryname');
    
  3. 保存更改。

  4. 查看此网址以获取更多信息:http://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/prestashop2/changing-the-prestashop-url-settings

关于php - 在 PRESTASHOP 的多商店 URL 上找不到所有 CSS 和 JS 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25970980/

相关文章:

php - xmlHttpRequest 检查 mysql 数据库中的更改

php - 单表实体生成

apache - 将 get-parameter 添加到 .htaccess 中的 rewrite_rule 不起作用

javascript - 如何在不重新加载页面的情况下修改 URL?

javascript - 点击链接后刷新div内容

javascript - 将 javascript 从单个日期排除转换为多个日期

php - 如何在 PHP CURL 中从 POST 切换到 GET

php - MySQL LEFT JOIN 多表逻辑问题

apache - 使用参数和 php 查询重写 URL

javascript - 属性选择不适用于 Android 浏览器