How to Delete query parameters in Magento

How to Delete query parameters (_from_store) when switching store views in Magento

Every multi-language magento site installed with multi-stores will have the “_from_store” query string generated in every URL when changing a language (store) to another. This can be an SEO issue and sometimes be confusing when studying the web analytics. To avoid this problem, follow this 2 step guide:

1) Open the “languages.phtml” file. (The path should be: /app/design/frontend/default/template/page/switch/languages.phtml)

2) Find line 41 and change it from:

echo $_lang->getCurrentUrl()
to this:
echo $_lang->getCurrentUrl(false)

This small change will force the store model in Magento to generate these URLs without the query parameter.

Hope this helps! Enjoy.

3 thoughts on “How to Delete query parameters in Magento

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>