My Yii app url format is domain/controller/function. I don't want to disclose the original controller name and function to user.The user should see only domain/foo/bar instead of original names.How can I achieve it?
2 Answers
You can archive it by using url manager. Imagine you have a controller called "SampleController" with an action called "actionSampless", then you can have something like this:
'urlManager'=>array(
'urlFormat'=>'path','showScriptName'=>false, 'caseSensitive'=>false,
'rules'=>array(
'test/test/*'=>'Sample/Sampless',
//'pattern1'=>'route1', (it goes like this)
),
),
for more info click here. read User-friendly URLs topic..
Hope it will help you.