Magento URL重写管理保留GET参数 [英] Magento URL Rewrite Management preserve GET parameters
问题描述
我正在使用Magneto的URL重写管理来重定向一堆页面.
但是,URL带有会员信息,即www.mysite.com/?aff=123
当Magneto重定向到正确的页面时,它将丢失aff = 123.
I am using to use the Magneto's URL Rewrite Management to redirect a bunch of pages.
However, the URLs come in with affiliate information i.e. www.mysite.com/?aff=123
when Magneto redirects to the correct page it losses the aff=123.
我如何保存此信息?
推荐答案
实际上,在Magento内部无法做到这一点. 您将需要在Apache mod_rewrite编辑.htaccess文件上执行此操作,并将 [QSA] (查询字符串追加)放在重定向行的末尾.
Actually there is no way to do that inside Magento. You will need to do this on Apache mod_rewrite editing .htaccess file and put [QSA] (Query String Append) at the end of the redirect line.
例如:
RewriteRule somedir/(.*) somedir2/$1 [QSA]
它将重定向
www.mysite.com/somedir/hello.php?test=1
www.mysite.com/somedir/hello.php?test=1
到
www.mysite.com/somedir2/hello.php?test=1
www.mysite.com/somedir2/hello.php?test=1
这篇关于Magento URL重写管理保留GET参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!