how to redirect the custom controller path to specific store name
http://testurl.com/testmodule/index/testview/id/123/
to
thanks
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityhow to redirect the custom controller path to specific store name
http://testurl.com/testmodule/index/testview/id/123/
to
thanks
You can try below code in your controller to set the redirect to your custom URL.
Mage::app()->getResponse()->setRedirect($url)->sendResponse();
// or
Mage::app()->getFrontController()->getResponse()->setRedirect($url)->sendResponse();
Edit:
$this->loadLayout();
$this->getLayout()->getBlock('block_class')->setTemplate('template_file_path'));
// Do your process
$this->renderLayout();
Reference: Can you set a template for every action within a controller?
Hope it helps!!!
In the controller action you need to write this line to redirect with current parameter (redirect inside your domain, not to an external website)
$this->_redirect('testname/index/index', $this->getRequest()->getParams());