routing - Forcing the use of aliased controllers -


i have controller, named: somelongunfriendlyname
in router gave alias: coolname
now, whenever calls /coolname/theaction, /somelongunfriendlyname/theaction executed. far good.
problem want deny use of original somelongunfriendlyname name.

how can done?


pop pop pop

you use beforefilter method of app controller check whether given uri has corresponding route. if does, issue redirect routed class. make sure check url shown on browser avoid infinite redirection.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -