I am using social engine, I want to change my url from www.example.com/signup to www.开发者_如何学Goexample.com/activate, sorry I want to keep both urls. please let me know how to do this
Put this code in your public/index.php file.
$FrontController = Zend_Controller_Front::getInstance();
$Router = $FrontController->getRouter();
$Router->addRoute("activate",
new Zend_Controller_Router_Route
(
"/activate",
array
("controller" => "signup",
"action" => "index"
)
));
here: activate is the name of the router. /activate is the url you want as address, controller and action is self descriptive.
In application/modules/Use/settings/manifest find these lines:
'user_signup' => array(
'route' => '/signup/:action/*',
'defaults' => array(
'module' => 'user',
'controller' => 'signup',
'action' => 'index'
)
Change /signup/:action/
to /activate/:action
.
You could modify your .htaccess to create redirects, refer to this example
精彩评论