URL rewriting seems to be failing on my setup (Fedora Core 7, JBoss 4.2.2 GA, JBoss Native 2.0.3 or JBoss Native 2.0.1) for no apparent reason (no exceptions, etc.) - when it works on the exact same setup on my Windows machine (XP, JBoss 4.2.2 GA, JBoss Native 2.0.3).
Here's my rewrite.properties file:
RewriteCond %{SERVER_PORT} ^80
RewriteCond %{REQUEST_URI} ^.*
RewriteRule ^/(.*) https://%{HTTP_HOST}/myapp [R=301,L]
I've turned up logging of the org.apache.catalina category to TRACE and I get the following log snippet on Windows (when I tried accessing http://localhost/abc - which then directs me to https://localhost/myapp):
21:55:00,765 DEBUG [MapperListener:] Handle jboss.web:type=RequestProcessor,work
er=http-127.0.0.1-80,name=HttpRequest1 type : JMX.mbean.registered
21:55:00,781 DEBUG [MapperListener:] Handle jboss.web:type=RequestProcessor,work
er=http-127.0.0.1-80,name=HttpRequest1 type : JMX.mbean.registered
21:55:00,781 DEBUG [MapperListener:] Handle jboss.web:type=RequestProcessor,work
er=http-127.0.0.1-80,name=HttpRequest1 type : JMX.mbean.registered
21:55:00,875 DEBUG [[localhost]:] Rewrote /abc as https://localhost/myapp with
rule pattern ^/(.*)
I don't see the same stack trace on Linux - in fact, when I try to access http://localhost/abc, I don't see anything resulting in the log file. I just get an Unable to connect error on Firefox. When I type in a URL which I know works - https://localhost/myapp - that doesn't require forwarding, then it works...
Is there a bug with rewriting URLs on JBoss Native Linux - or what am I doing wrong?