.htaccess Magento htaccess重定向301
我正在尝试将一些magento URL重定向到http 我当前的网址是.htaccess Magento htaccess重定向301,.htaccess,magento,mod-rewrite,redirect,magento-1.7,.htaccess,Magento,Mod Rewrite,Redirect,Magento 1.7,我正在尝试将一些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
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
我想将所有店铺url重定向到http url
就像mysql函数一样店铺%重定向到301 https到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
您可以在Magento管理面板中对此进行更改 系统->配置->网络->安全
Use Secure URL's in Frontend: Yes
将该选项设置为否,它将自动重定向到http://上。此代码解决了此问题
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]
谢谢 如果您没有通过上面提到的解决方案实现这一点,则可能会出现问题,即购物车和结帐页面也将仅通过HTTP重定向。在我看来,这将是一个巨大的声誉损失。