Our application is hosted in Apache 2.2.10 Web server. Load balancing is configured in virtual host.
Usual URL requests of the application are of the kind /InfoViewApp/?0.2322. But, after a patch, the URL structure has a error : /InfoViewApp?0.62136781078
4860 The ' / ' is missing before the ' ? '.
What happens When the requests are forwarded directly to Tomcat?
1. The URL request that is problematic has now got a request similar to below:
But, the original request should be /InfoViewApp/?0.6213678107
2. Because of this, HTTP response code 302 is thrown (i.e., moved temporarily).
3. The client side browser (eg., internet explorer) is capable of handling the 302 response codes :
The URL is then corrected by the browser and request is redirected as /InfoViewApp/?0.6213678107
848606. So, the correct request yields a HTTP response code of 200 (i.e., successful response)
So what happens when requests go via Apache?
1. The invalid URL - /InfoViewApp?0.62136781078
48606 is passed on to Apache.
2. Apache passes this request to Tomcat via load balancer.
3. Tomcat throws 302 response code back to Apache(in this case not passed on directly to the browser that can handle 302).
4. But, the problem lies that : Apache redirect for response code 302 is not configured in the config file. So connection to the server is reset and we get PING error in our browser. Only, if this is configured, Apache can handle the 302 code without throwing error.
How to configure the redirect?
I tried out the following with no success :
RewriteRule ^/InfoViewApp(\?.*)$ https://domain/InfoViewApp/$1
Please help in sorting out this issue.