【问题标题】:Magento 1.9 inside wordpress folder gives 404 in product pageWordPress 文件夹中的 Magento 1.9 在产品页面中给出 404
【发布时间】:2016-09-23 14:18:33
【问题描述】:

我在 Wordpress 中有一个 magento 网站,其结构如下:

  • wordpress/magento

迁移到本地服务器后,我可以让一切正常运行,除了产品页面,这给了我 404 错误。

我可以访问主页 (wordpress)、目录页面 (magento) 但不能访问产品页面 (magento)

我注意到当我访问产品页面时,magento 主文件夹被删除了。

这是我的目录文件夹 - 好的

http://mystore/store/product-category

当我尝试访问产品时 - 404 错误

http://mystore/product-category/product

在这种情况下,htaccess 会删除 store 文件夹。

我可以想象错误出现在 magento 根目录中的 .htaccess 文件上,但我不知道缺少什么。

这是我的 htaccess 文件:

DirectoryIndex index.php

<IfModule mod_rewrite.c>

Options +FollowSymLinks
RewriteEngine on

#RewriteBase /mystore/store/

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteRule .* index.php [L]

</IfModule>

希望你能帮助我。

提前致谢, 丹尼尔

【问题讨论】:

    标签: wordpress .htaccess magento http-status-code-404


    【解决方案1】:

    我在服务器日志中注意到,当我尝试访问产品时,服务器会尝试访问以下网址:

    http://localhost/store/catalog/product
    

    什么时候他应该尝试访问:

    http://localhost/mystore/store/catalog/product
    

    我不知道他从哪里得到这个

    【讨论】:

      【解决方案2】:

      您检查过base_urlsecure_base_url 吗?这是一种改变它的方法:https://docs.nexcess.net/article/how-to-change-magento-base-urls.html

      还要检查 .htaccess 中的重写规则:#RewriteBase /mystore/store/

      【讨论】:

        猜你喜欢
        • 2017-07-20
        • 1970-01-01
        • 2017-05-29
        • 1970-01-01
        • 1970-01-01
        • 2017-03-26
        • 1970-01-01
        • 2016-09-06
        • 1970-01-01
        相关资源
        最近更新 更多