Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Apache installed on my server and I need to redirect from http to https. The reason for this is our load balancer solution cannot hand https so requests come in on http and then we transfer them to https using the below lines in the httpd.conf file.

     Redirect 302 /GladQE/link

This works fine for GET requests but POST requests will loose the parameters passed on the URL. What would be the easiest way to perform this redirect and maintain POST params?

I need to get from to here maintaining POST params



share|improve this question
Your requests go through the whole internet without any encryption, so why the hell do you want to use https for the last hop?.... – Pascal Schmiel Jun 25 '13 at 10:46
Switch to a load balancer that can handle 443/tcp with ssl or deploy an app on your webservers 80/tcp that does a correct POST redirect (looks like you're using Java?). – fsoppelsa Jun 25 '13 at 10:56
Because we are not so concerned about the information transferred over HTTP (the params) But we are concerned where later in the process confidential info will be submitted. – shawsy Jun 25 '13 at 11:36
Hi fsoppelsa, Yes we are using java. This is a good idea! i will try. – shawsy Jun 25 '13 at 11:40

As specified in RFC 2616 Sec 10.3, if the response to a POST request is a redirect (301, 302, 303, or 307), the user agent must NOT repeat the POST at the new location.

Your only hope for repeating a POST would be for the first response to return some JavaScript that automatically re-submits the form data at the new location.

However, considering that you've already divulged the form data over cleartext HTTP, there really isn't much point to continuing the session over HTTPS. You really ought to start earlier and present the user with the initial form over HTTPS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.