有什么方法可以替换“& amp;"吗?带有“&"在Magento URL中 [英] Is there any way to replace "&" with "&" in Magento URL

查看:386
本文介绍了有什么方法可以替换“& amp;"吗?带有“&"在Magento URL中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以用magento url中的&替换&. 每次magento URL从一个商店重定向到另一商店时,它都会在URL之间添加&.网址已损坏.例如:

Is there any way to to replace & with & in magento url. Every time when magento URL is redirecting from one store to another it is adding & between the url. And the url is breaking. for eg:

https://www.indelust.com/designer?d=370

"URL上方"是基于美国geoIP链接到美国商店视图的默认URL.当我点击Google搜索结果中的网址时,应将我重定向到具有相应storeview的同一页面.现在,在url下面是我点击Google搜索结果时的网址.

Above URL is the default url which is linked to US storeview based on US geoIP. When I am clicking on the url from Google search results it should redirect me to the same page with respective storeview. Now below url is the one when I clicked on google search result.

https://indelust.com/in/designer?___store = in_storeview& d = 370

并且上面的链接断开了.

And the above link is breaking.

当我在上面的URL中进行较小的更正时,将&更改为&.那对我来说很好.

When I am making a small correction in the above url, by changing & to &. Then it is working fine for me.

我仔细阅读了一些教程,并在下面找到了相关的教程,但没有得到根据magento url模式解决的答案. https://magento.stackexchange.com/questions/38513/amp-而不是用语言切换网址

I gone through some tutorials and below I found the relevant one, but I did not get the answer to resolve based on magento url pattern. https://magento.stackexchange.com/questions/38513/amp-instead-of-in-language-switch-url

有人可以帮助我吗?

推荐答案

您应该找出出现此问题的原因,但是,如果您只想替换url,则应将其添加到您的.htaccess文件中:

You should find out why the issue appears, but if you just want to replace the url you should add this to your .htaccess file:

RewriteEngine On
RewriteRule ^(.*)&(.*)$ /$1&$2 [L,R=301]

这篇关于有什么方法可以替换“& amp;"吗?带有“&"在Magento URL中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆