In my custom module I have passed parameter in URL like this:
<?php $currentUrl = Mage::helper('core/url')->getCurrentUrl(); ?>
<a href="<?php echo $currentUrl .'?alpha='. $letter ;?>"><?php echo $letter; ?></a>
The problem is that I have used this parameter to filter collection and the result is returned to the same page, everything is working fine. But from result page when another parameter is selected URL became like this:
www.mydomain/category.html?alpha=D?alpha=J
Is it possible to remove the duplicate parameters?
Note: need to remove only duplicates not the other parameters.
currentUrl
to the base url without any parameter to prevent it from just appending the new one?
then you probably won't be able to parse it properly anyway