I am working on the application that contains different-2 modules like html5, flash and i want to redirect user to corresponding module on the basis of the browser compatibility.
1 Answer
I think the best method is to write a controller plugin for that
class Custom_Plugins_Browsercompatability extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{
//check browser compatability
if($html5)
{
$request->setModuleName('html');
$request->setControllerName('index');
$request->setActionName('index');
}
else if($flash)
{
$request->setModuleName('flash');
$request->setControllerName('index');
$request->setActionName('index');
}
}