【问题标题】:Prestashop backoffice works but the frontoffice doesn't. The url is not foundPrestashop 后台工作,但前台不工作。找不到网址
【发布时间】:2015-05-14 13:34:21
【问题描述】:

我在 mac 中使用 xampp 完全在 localhost 中开发了一个多语言 prestashop 商店,它可以工作。后台和商店(前台)。之后,我已将其部署到亚马逊,但我的问题出现了。后台工作,但商店没有。

浏览器只显示一个 apache 404 页面并告诉我在此服务器上找不到请求的 URL 域/prestashop/en/。但它确实存在。此外,后台确认。

检查 error.log 我发现以下消息:

[Thu Mar 12 11:12:37 2015] [错误] [client xxx.xxx.xxx.xxx] 文件不存在:/var/www/prestashop/en

就我所见,Apache 将语言 (/en/) 视为文件而不是文件。我在网上搜索了所有内容,但找不到解决方法。我知道这是服务器问题,但不知何故找不到解决方案。

这是怎么回事?

-- 编辑--

我通过以下步骤解决了这个问题:

  1. 已删除根 .htaccess
  2. 清除了./cache/smarty/compile下的smarty缓存文件
  3. 加载未安装的 mod_rewrite 模块:a2enmod rewrite
  4. 将 Allowoverride All 指令添加到 /etc/apache2/apache2.conf
<Directory /var/www/prestashop/>
        Options Indexes FollowSymLinks
        AllowOverride All
</Directory>
  1. 重启 apache2:服务 apache2 重启

【问题讨论】:

  • 您必须在“SEO & URL”选项卡上定义(如果不存在则添加)自定义 URL 名称。
  • url 存在,它是 index.php 但唯一的可能是英文或西班牙文。
  • 您手动将 url 更改为 lang-en 而不是 en 会发生什么?
  • 也没找到
  • 但是 url/en/index.php 确实存在?

标签: php apache url-rewriting amazon prestashop-1.6


【解决方案1】:

我通常通过以下方式设置我的虚拟主机

<Directory /var/www/prestashop/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-03
    • 1970-01-01
    • 2015-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多