Reputation: 50117
How do I create a catch-all URL-mapping in Grails?
The following Grails UrlMapping ..
class UrlMappings {
static mappings = {
"/$something"{
controller = "something"
action = "something"
}
}
}
.. appears to match ^/[^/]*
but how do I create an UrlMapping matching all URLs (^/.*
)?
Upvotes: 5
Views: 3728
Reputation: 66059
You're looking for the ** "double wildcard". Example:
class UrlMappings {
static mappings = {
"/**"(controller: "something", action: "something")
}
}
Upvotes: 15