I have a customised CMS page which includes a login form, I have code that lets me grab the referrer url parameter which works fine when testing in pure php.

However when putting this live I encounter a strange problem

If the URL to the cms page is \loginnew, the referral URL is \loginnew\referer\encodedurl which returns a not found page instead of the intended CMS page with paramaters

I'm not sure how to enable a CMS page to accept the refer parameter, but can capture the parameter when testing outside of Magento with code I found here


You may need a controller action that handles that submission and redirects to your \loginnew endpoint.

From the answer to question you referenced did you use this code:

<?php $referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME); 
echo Mage::helper('core')->urlDecode($referer);
<form action="<?php echo Mage::getUrl('customer/account/loginPost', array('referer' => $referer)); ?>" method="post" id="login-form">

May you post your template file and any other related code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.