Hide controller name from outside


Let say i have a controller mycontroller. Is it possible for it to be accessible only with an alias, for example mycontrolleralias ?

So i want :

I want to hide true controller name from outside.


Yes, use URL rules.

See CUrlManager and the guide.

Does CurlManager give 404 error for an alternative, but valid, url?

CUrlManager allow me to set an "alias", but how can i fake a non-existing controller ?

This approach may be usable also in your case.


Quick poor solution: assign the URL to an action that just throws a CHttpException, passing code 404.

Thank you !

Please don’t forget to vote for the people who helped you :)