My problem is i want to remove the querystring part of this URL and make it clean.
http://staging.mysite.com/mycontroller?name=/philippines/about-manila
currently i have MyController.index() and I parse the name parameter in this method.
What i would eventually want is this :
http://staging.mysite.com/mycontroller/philippines/about-manila
the parameter part 'philippines/about-manila' can have arbitrary number of parameters, like
http://staging.mysite.com/mycontroller/philippines/about-manila/people
How can i do this in routes?
It sounds like you want route globbing. If you use:
and then go to the URL http://staging.mysite.com/mycontroller/philippines/about-manila/people, then your
mycontrollercontroller’sindexaction will be called, andparams[:parts]will contain the array["philippines", "about-manila", "people"].