【问题标题】:All CSS and JS files are not found on multistore URL in PRESTASHOP在 PRESTASHOP 的多存储 URL 上找不到所有 CSS 和 JS 文件
【发布时间】:2014-11-16 05:40:06
【问题描述】:

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

【问题讨论】:

  • 你的css和js文件的url应该以/开头或者是绝对url

标签: php friendly-url prestashop-1.6


【解决方案1】:
  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

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-03-22
  • 1970-01-01
  • 2017-08-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多