Here's the issue:
I have a website project (grails) I'm working on with a bunch of controller-less views (this is a temp site rewrite requested in grails with no real functionality to it (hence no controllers)) and the views are rendered via the following:
"/**/$view"{
controller: 'staticViewController'
action: 'view'
}
where "staticViewController" outputs the view as HTML no matter where it is.
Hence my issue.
[site.com/about/something/dog.html] renders the same as [site.com/about/dog.html] renders the same as [site.com/stinkybutt/dog.html]
From the last example, the bigger issue becomes apparent since obviously I don't have (or want) a directory structure named "stinkybutt".
I can write a crap-ton of redirects in HTTPD to solve for this issue but I'm guessing there's a native solution since other sites using grails don't have this problem.
Any suggestions?
If I'm understanding your question correctly - you're looking for a way to apply constraints on the '**' portion of the url map. I haven't tried it but from the docs, you can capture a wildcard path and store it in a variable. I know you can apply constraints to a variable, so with that knowledge I'm assuming something like this might work:
The above should only serve up about/dog.html and return 404 for everything else. On the other hand if you want everything to serve up dog.html EXCEPT for certain urls, you can negate the match with something like:
Note: my regex is really rusty, so you might have to fiddle with it