Skip to content

Instantly share code, notes, and snippets.

@tournasdim
Created March 2, 2014 09:02
Show Gist options
  • Save tournasdim/9303885 to your computer and use it in GitHub Desktop.
Save tournasdim/9303885 to your computer and use it in GitHub Desktop.
Add a custom route or alias to your ZF1-application . Paste the code into application/bootstrap.php
protected function _initRouter()
{
$frontController = Zend_Controller_Front::getInstance();
$router = $frontController->getRouter();
// Product view route
$route = new Zend_Controller_Router_Route(
'/home',
array(
'controller' => 'index',
'action' => 'index'
));
$router->addRoute('home', $route);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment