Skip to content

Instantly share code, notes, and snippets.

@shamun
Created July 4, 2011 21:59
Show Gist options
  • Save shamun/1063998 to your computer and use it in GitHub Desktop.
Save shamun/1063998 to your computer and use it in GitHub Desktop.
1. When i visit http://site/en/selection, it gives error no page found
2. when i visit http://site/en/selection/index does not give error and works
Question: How can i allow 1 to act same like point 2?
<?php
protected function _initRoutes()
{
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();
$dynamic = new Zend_Controller_Router_Route(
'/:language/:controller/:action/*',
array(
'controller' => 1,
),
array('language' => '^[a-zA-Z0-9_]*$')
);
$router->addRoute('dynamic', $dynamic);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment