How can I get current url without utm parameters for example? I need this in phtml templates.
Thank you.
EDIT
EXAMPLE:
From url
www.example.com/post?utm_source=google&utm_medium=cpc&utm_campaign=campaign
I need to get only
www.example.com/post
Best Answer
The cleanest way to do that is:
'*/*/*'
means that you stay on the same module/controller/actionThe option
'_use_rewrite'
let you keep the rewrited url, for example:/my-category/my-product-url-key/
instead of/catalog/product/view/id/456/category/123
The option
'_forced_secure'
will be useful for website having SSL enabled.There are other options that you can find documented here: http://dltr.org/blog/magento/418/Magento-get-url-with-or-without-parameters