aneesh
(Aneesh161191)
1
Hi, in the application i would like to change the url format .
its the real format for creating address
http://localhost/webapp/address/create
i want to change this with
http://localhost/webapp/address
and for list url is
http://localhost/webapp/address/index
want to change like this
http://localhost/webapp/address/list
How it can change?
thanks.
akshatsha
(Akshatsha)
2
In your protected/config/main.php , you may define rules in UrlManager Class Array
Example:
'webapp/<address>/<action>'=>'webapp/<action>',
'webapp/<action>'=>'webapp/<action>',
For Refernce , you may go through link URL Management
aneesh
(Aneesh161191)
3
No change. config main.php
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'webapp/<address>/<action>'=>'webapp/<action>',
'webapp/<action>'=>'webapp/<action>',
),
),
akshatsha
(Akshatsha)
4
Well the formal should be like this
If Your Module is webapp
Define module in config.php , if already defined please ignore.
'modules' => array(
'webapp',
),
And the rule to be defined should be in this format, if your controller is AddressController.php in webapp module:
'controller_class_name/<action_to_call>'=>'webapp/address/<action>'
OR
'controller_class_name/<action_to_call>/<any_request_variable>'=>'webapp/address/<action>'
aneesh
(Aneesh161191)
5
Modules not used in this application.