OK, I figured it out.
In order to set a parameter to the rewrite rule, you need to specify it in the NEXT line (not in the same - won't work).
regex['^/Shoes/$'] -> rewrite['/showShoes.action']
Now, I still need to find a way to set NC (case-insensitive)...
In order to set the Method parameter to GET or POST, you would need to do this:
method[GET] and regex['^/Shoes/$'] -> rewrite['/showShoes.action']
I'm looking for a solution to set NC in undertow-handlers.conf as well. Where you able to figure it out?
Ok, I am now almost certain that flags cannot be set in undertow-handlers.conf.
I got to know that the java class named: 'RegularExpressionPredicate.java' is responsible for parsing regexes, and this is not setting any flags (as seen here):
The only alternative is to use character classes. This clumsy rule worked for me:
I have raised a JIRA ticket (feature request) with Undertow for this issue.
Please let me know if there is any solution to this. I will modify/cancel this ticket accordingly.