1
votes

We have a custom web application, which is setting Location header to redirect to a new page, but application is sending a return code of 200 (instead of 302). Browser is ignoring the Location header and does nothing due to return code 200.

Custom application is front-ended (reverse proxy) by Apache web server.

Is there any way to update return code in Apache to 302, where Location header is present and return code is 200?

1
what is your application sending to apache? what interface are you using CGI? , fastCGI? - Jasen
Custom application is written in Java. It should have set return code of 302 when Location header is set. - Shinchan
no. code comes before header. - Jasen

1 Answers

1
votes

if you're sending the return code on the first line of the response like

HTTP/1.1 302 Moved

you're doing everything right.

if you can't send the HTTP code perhaps you can get the effect you want with a refresh header.