Forum Moderators: phranque

Message Too Old, No Replies

internal redirect not passing post data

re-visiting this unsolved problem

         

amznVibe

7:23 pm on Jul 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unfortunately this thread from a few months ago was closed:
[webmasterworld.com...]

I am having a very similar problem, the internal redirect is simply not sending the post data to a cgi (in this case login info) though of course the get data is arriving just fine.

Anyone have additional insights/workarounds at this point (hopefully)?

jdMorgan

8:00 pm on Jul 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Someone posted in a different thread, saying that POSTs cannot be redirected, but leaving open the possibility that they could be rewritten. Unfortunately, I can't find that thread.

Obviously, POSTs cannot be allowed to pass through an external (i.e. 301 or 302) redirect, because that would be a potential security threat to the client, but I would think that a server-internal rewrite would be OK.

Jim

gergoe

10:42 pm on Jul 10, 2004 (gmt 0)

10+ Year Member



Can you post your mod_rewrite related directives, so we can see what is all about?

According to jdMorgan (and to my earlier post he mentioned ;-) you can't forward the post data to external sites with redirection, only with proxying. The same applies to local resources; if you specify the Redirect flag for your rules it won't work.

amznVibe

3:35 am on Jul 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



here's the directive for what it's worth:

RewriteRule ^subscriptions(.*)$ /cgi-bin/cms/subscriptions.cgi$1 [T=application/x-httpd-cgi,NC,L]

(note that it works great in every way except postdata)

amznVibe

3:36 am on Jul 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I also read that P (proxy) instead of L might fix this but I don't have that ability on my server and no way to add it.

gergoe

2:02 pm on Jul 11, 2004 (gmt 0)

10+ Year Member



Can you post the relevant part of the html form please? The cgi-bin is a directory in your webroot, or it is just mapped there?

The P flag you don't need in this case, since this is an internal rewriting. It means that the apache loads the rewritten file instead of the original one, but the request is kept unchanged (so what was included in the original request (post data for example) it will be in the rewritten one also).