【问题标题】:Magento htaccess redirection 301Magento htaccess 重定向 301
【发布时间】:2014-05-04 07:58:06
【问题描述】:

我正在尝试将一些 magento url 重定向到 http

我现在的网址是

https://www.amitbera.com/shop.html
https://www.amitbera.com/shop/abc.html
https://www.amitbera.com/shop/abc.html
https://www.amitbera.com/shop/jde.html
https://www.amitbera.com/shop/fg.html
https://www.amitbera.com/shop/fg/gyt.html
https://www.amitbera.com/shop/fg/gyt/test.html

我想把所有的shop url重定向到 http url .就像mysql函数一样函数 shop% redirect to 301 https to http

http://www.amitbera.com/shop.html
http://www.amitbera.com/shop/abc.html
http://www.amitbera.com/shop/abc.html
http://www.amitbera.com/shop/jde.html
http://www.amitbera.com/shop/fg.html
http://www.amitbera.com/shop/fg/gyt.html
http://www.amitbera.com/shop/fg/gyt/test.html

【问题讨论】:

    标签: .htaccess magento mod-rewrite redirect magento-1.7


    【解决方案1】:

    这段代码解决了这个问题

    Options +FollowSymLinks
        RewriteEngine on
    
    
    RewriteEngine on
    RewriteCond %{SERVER_PORT} ^443$
    RewriteRule ^(shop|blog|stockists|inthepress|contacts|review|home) http://www.example.com%{REQUEST_URI} [R=301,L]
    
    RewriteCond %{HTTPS} on
    RewriteRule ^$ http://%{HTTP_HOST} [L,R]
    

    谢谢!!!!!!!!!

    【讨论】:

      【解决方案2】:

      您可以在 Magento 管理面板中更改此设置。

      系统 -> 配置 -> 网络 -> 安全

      Use Secure URL's in Frontend: Yes
      

      将该选项设置为否,它应该会自动重定向到 http://。

      【讨论】:

      • 如果您没有通过上述解决方案完成此操作,则可能会出现问题,即购物车和结帐页面也将仅通过 HTTP 重定向。在我看来,这将是一个巨大的声誉损失。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-01
      • 2011-01-03
      • 2012-03-10
      • 2021-07-22
      • 1970-01-01
      相关资源
      最近更新 更多