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
Post a Comment