|
Home > Archive > Web Servers on Unix and Linux > May 2004 > Re: apache 2.0.40 POST fails (GET instead) depending upon hostname
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: apache 2.0.40 POST fails (GET instead) depending upon hostname
|
|
| David Logan 2004-05-02, 3:35 pm |
| This is absolutely perfect, and undoubtedly will solve my problem once I
fully understand it.
What I wish to do is *stop* redirection. Nothing is being redirected,
even though different hostnames or URLs may be present. I need to
convince the Apache server that each of these are still the same
location, same page, to avoid it sending a redirection.
I will research your page, Lynx traces, Apache manuals, and other
documentation to find a solution to this problem. I needed only a
starting spot.
Thank you!
David Logan
Alan J. Flavell wrote:
> On Sun, 2 May 2004, David Logan wrote:
>
> [...]
>
>
>
> HTTP/1.0 302 Moved Temporarily
> Date: Sun, 02 May 2004 14:54:41 GMT
> Server: Apache/1.3.29 (Unix) mod_pointer/0.8 PHP/4.3.2
> X-Redirected-By: mod_pointer - http://stderr.net/mod_pointer/
> Location: http://24.8.61.156/poolnew-cgi/test.py
> Content-Type: text/html; charset=iso-8859-1
>
>
> What's wrong here is not that you're getting an "incorrect GET", but
> that the first server is issuing a 302 redirection; the browser is
> then only doing what comes naturally in response to that redirection.
> Well, the fact that the server is issuing _any_ kind of redirection is
> pretty much fatal in this context, seeing that you are trying to issue
> a POST - as I was forced to conclude in my page on this topic:
>
> http://ppewww.ph.gla.ac.uk/~flavell...t-redirect.html
>
> Your best bet would be to write the real URL of your server in the
> form's action=. It's not as if this needs to be a friendly URL of the
> kind supported by mod_pointer, I guess.
>
> good luck
| |
| Alan J. Flavell 2004-05-03, 10:37 am |
| On Sun, 2 May 2004, David Logan wrote:
> What I wish to do is *stop* redirection.
Indeed. Then, as I said before, you will need to cite, on your
form action URL, the real URL which is at the target of the
redirection, instead of the "user friendly" one which is causing the
redirection.
> Nothing is being redirected,
On the evidence that I presented, it most certainly -is-.
Let's go through this again:
[ppepc56] ~ > host www.loganshouse.net
www.loganshouse.net is an alias for loganshouse.net.
loganshouse.net has address 64.202.167.129
[ppepc56] ~ > lynx -head -dump http://www.loganshouse.net/poolnew-cgi/test.py
HTTP/1.0 302 Moved Temporarily
Date: Mon, 03 May 2004 13:34:52 GMT
Server: Apache/1.3.29 (Unix) mod_pointer/0.8 PHP/4.3.2
X-Redirected-By: mod_pointer - http://stderr.net/mod_pointer/
Location: http://24.8.61.156/poolnew-cgi/test.py
Content-Type: text/html; charset=iso-8859-1
etc.
[ppepc56] ~ > lynx -head -dump http://24.8.61.156/poolnew-cgi/test.py
HTTP/1.0 200 OK
Date: Mon, 03 May 2004 13:33:15 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Content-Length: 3277
Content-Type: text/html; charset=ISO-8859-1
etc.
Not only do the two servers have different IP addresses, but they are
different versions of Apache on (presumably) different OSes.
Perhaps you need to read the documentation for mod_pointer to
understand what you've got here, if it's not something that has been
explained to you by your provider.
> I need to convince the Apache server that each of these are still
> the same location,
But they aren't, as you see above.
Good luck
[vbcol=seagreen]
> Alan J. Flavell wrote:
Don't do that. Usenet netiquette has already decided on an
appropriate followup style (to quote only what is relevant, and to
intersperse your responses with it so that the other readers can
follow the discussion). You'll cause endless friction if you don't
adapt to that.
[snipped]
| |
| David Logan 2004-05-03, 11:38 am |
| Alan J. Flavell wrote:
> On Sun, 2 May 2004, David Logan wrote:
>
>
>
>
> Indeed. Then, as I said before, you will need to cite, on your
> form action URL, the real URL which is at the target of the
> redirection, instead of the "user friendly" one which is causing the
> redirection.
>
>
>
>
> On the evidence that I presented, it most certainly -is-.
Yes, I understand that it is, what I don't understand exactly is why.
I cite that nothing is being redirected because my form is served from
the same web server regardless. Thus it is not being redirected, even
though somehow it certainly is.
>
> Let's go through this again:
>
> [ppepc56] ~ > host www.loganshouse.net
> www.loganshouse.net is an alias for loganshouse.net.
> loganshouse.net has address 64.202.167.129
>
> [ppepc56] ~ > lynx -head -dump http://www.loganshouse.net/poolnew-cgi/test.py
> HTTP/1.0 302 Moved Temporarily
> Date: Mon, 03 May 2004 13:34:52 GMT
> Server: Apache/1.3.29 (Unix) mod_pointer/0.8 PHP/4.3.2
> X-Redirected-By: mod_pointer - http://stderr.net/mod_pointer/
> Location: http://24.8.61.156/poolnew-cgi/test.py
> Content-Type: text/html; charset=iso-8859-1
> etc.
>
> [ppepc56] ~ > lynx -head -dump http://24.8.61.156/poolnew-cgi/test.py
> HTTP/1.0 200 OK
> Date: Mon, 03 May 2004 13:33:15 GMT
> Server: Apache/2.0.40 (Red Hat Linux)
> Content-Length: 3277
> Content-Type: text/html; charset=ISO-8859-1
> etc.
>
> Not only do the two servers have different IP addresses, but they are
> different versions of Apache on (presumably) different OSes.
>
> Perhaps you need to read the documentation for mod_pointer to
> understand what you've got here, if it's not something that has been
> explained to you by your provider.
>
>
>
>
> But they aren't, as you see above.
>
> Good luck
>
>
Perhaps it has to do with how I set up my "fake" external domain. I used
some dumb service, I forget even which one. "register.com" or something.
"loganshouse.net" was not taken, so I signed it up to me, and then I set
it up so that "www.loganshouse.net" is redirected...
hmmm...I think I may have it. "loganshouse.net" points to a register.com
ip address, whereas www.loganshouse.net is redirected, by register.com,
to my own DHCP supplied IP address.
If I use <form action=http://24.8.61.156/cgi method=post> it works,
whereas <form action=http://www.loganshouse.net/cgi method=post> fails,
even though www.loganshouse.net=24.8.61.156.
I was trying to avoid using the IP address since it changes from time to
time, and doing global changes in my html files and CGI scripts suck.
But it seems to be the only way, short of finding a better way to have
my own public DNS rather than use some el-cheapo site.
By the way, I ran my own traces, and found what you said to be true. My
work since then has shifted to a solution to this known problem.
I should read the documentation on mod_pointer. A lot of this stuff I
use on faith, and now I need to understand what it is really doing.
David Logan
| |
| Alan J. Flavell 2004-05-03, 12:37 pm |
| On Mon, 3 May 2004, David Logan wrote:
> Perhaps it has to do with how I set up my "fake" external domain.
You've got it. That's where I expected this was going to land.
> hmmm...I think I may have it. "loganshouse.net" points to a register.com
> ip address, whereas www.loganshouse.net is redirected, by register.com,
> to my own DHCP supplied IP address.
If the DHCP address changes from time to time, then you would need to
create the form itself dynamically, and plug the current address into
it. No big deal, if you really want to stick with this hosting setup.
Or change your hosting arrangements so that you have a fixed IP and a
proper DNS entry to go with it.
> If I use <form action=http://24.8.61.156/cgi method=post> it works,
> whereas <form action=http://www.loganshouse.net/cgi method=post> fails,
Right... that comes as no surprise to me :-}
> even though www.loganshouse.net=24.8.61.156.
No, it doesn't. You even quoted me giving the answer, but seem
not to have seen it.
Once more, with feeling:
# host www.loganshouse.net
www.loganshouse.net is an alias for loganshouse.net.
loganshouse.net has address 64.202.167.129
> I was trying to avoid using the IP address since it changes from time to
> time, and doing global changes in my html files and CGI scripts suck.
Well, you're clearly on your way to understaning the problem.
good luck
|
|
|
|
|