Hi,
I am trying to use JBoss Rewrite to restrict some URl to be accessed by any user. For this I have used following code
RewriteCond %{QUERY_STRING} .*/abc.html.* [NC,NE]
RewriteRuke ^/app(.*) - [F]
Here, I want to restrict access to all such URL's which contains string "/abc.html". The above rule is working fine for all possible URL's except when used encoded characters like %6D for 'm'.
For example, If I hit URl like " http://myserver/app?service=access&path=/xyz-0-1-2/abc.ht%6dl" in browser, then Rewrite valve should return me 403 response.
But, currently when I apply [NE] flag in front of RewriteCond, JBoss fails to get load successfully. I could find the following in my Jboss log,
WARN [org.apache.tomcat.util.http.Parameters] Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
I didn't get any information about the reason behind Failure in Jboss load, but when I remove [NE] flag, JBoss loads successfully.
Is anybody have any idea about this issue or is there something went wrong in my RewriteRule.?
Looking at your stacktrace you are not trying to do this in WildFly. Are you?