I am using social engine, I want to change my url from www.example.com/signup to www.example.com/activate, sorry I want to keep both urls. please let me know how to do this
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
.
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.
您可以修改.htaccess来创建重定向,请参考此示例
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.