You can do something in the following method within before sending.
public function yourMethod($observer) { if ($condition) { $request = Mage::app()->getRequest(); $request->initForward() ->setControllerName('controllername') ->setModuleName('modulename') ->setActionName('actionname') ->setDispatched(false); return false; } }
Although, if you are working with a custom controller, why not always route it, for example, indexAction ()? And as part of this method, find out where you want to continue (forward), such as Kalpesh mentioned in his answer? Performance is reasonable, there is no difference.
source share