Magento URL Rewrite Management preserve GET parameters [closed]

有些话、适合烂在心里 提交于 2019-12-22 10:14:18

问题


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.

How can i preserve this information?


回答1:


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.

For example:

RewriteRule somedir/(.*) somedir2/$1 [QSA]

It would redirect

www.mysite.com/somedir/hello.php?test=1

to

www.mysite.com/somedir2/hello.php?test=1



来源:https://stackoverflow.com/questions/12783424/magento-url-rewrite-management-preserve-get-parameters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!