Created
July 4, 2011 21:59
-
-
Save shamun/1063998 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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