I have a controller, named: SomeLongUnfriendlyName
In the router I gave it an alias: CoolName
Now, whenever someone calls /CoolName/theAction, the /SomeLongUnfriendlyName/theAction is executed. so far so good.
My problem is that I want to deny the use of the original SomeLongUnfriendlyName name.
How can it be done?
pop pop pop
You should be able to add it as a redirect route (if you’re using Cake 2.x). I’ve never tried anything but from what I know about the routing system, if you place this last and none of the other routes catch, it will do a proper redirect to the aliased controller.
Here we’re redirecting the name you don’t want to use to the new one.