URL mapping in Grails -


suppose url:

https://stackoverflow.com/questions/ask/question1.xml

currently in urlmappings.groovy have `

"/$question/$ask/$question1"(controller:"somecontroller")` handle request.

if url changes to:

https://stackoverflow.com/questions/ask/askagain/question1.xml

my url mapping cannot handle it.

is there way can ask/askagain referenced $ask in urlmapping.groovy?

this did around this. changed urlmapping

"/$question/$ask**"(controller:"somecontroller") 

if url :

`http://stackoverflow.com/questions/ask/askagain/question1.xml` 

so now, $ask** = ask/askagain/question1.xml

then, if want remove question1.xml url. can use regex rid of it.


Comments