We need to know what requests should be sent to your servlet so that we know how to encode the rules. I canβt say whether all requests, except CSS and images, should be sent to your servlet or b) your servlet should only process requests for a specific set of folders / directories. You probably want to do one of two things:
Exclude specific folders:
^/(?!css|images).*
Or include specific folders:
^/myservlet/.*
You should change these * characters to + if, as you pointed out in your previous question, you want to require at least one character after / in the pattern.
source share