You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dmitri <zl...@canada.com> on 2002/11/18 06:52:49 UTC

[users@httpd] redirect hiding

Hi,
I have a question concerning redirects with apache.
I have some (cgi or php) script that redirects (302) to itself or some other
file, in the same directory.
I want the new URL (after redirection) to show up in browser as such.
But what happens is apache seems to handle the redirect internally and
instead of 302 the browser receives a 200 with the destination file contents
and no mention of the new URL.
How do I disable this behaviour with apache? I imagine the answer is very
simple, sorry I couldn't find anyting.

I am using 1.3.27 on redhat 7.2.
Also, on Win32, the situation is different - the server does issue the 302
code and the browser behaves as expected.

Yours trully,
    Dmitri




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] redirect hiding

Posted by Dmitri <zl...@canada.com>.
Sorry, my bad.
Turns out the problem was, scripts didn't automatically output "Status: 302
Found" header, like I expected after reading PHP mannual. Adding this header
explicitly to scripts' output fixed the problem.

--Dmitri



----- Original Message -----
From: "Dmitri" <zl...@canada.com>
To: <us...@httpd.apache.org>
Sent: Monday, November 18, 2002 12:52 AM
Subject: [users@httpd] redirect hiding


> Hi,
> I have a question concerning redirects with apache.
> I have some (cgi or php) script that redirects (302) to itself or some
other
> file, in the same directory.
> I want the new URL (after redirection) to show up in browser as such.
> But what happens is apache seems to handle the redirect internally and
> instead of 302 the browser receives a 200 with the destination file
contents
> and no mention of the new URL.
> How do I disable this behaviour with apache? I imagine the answer is very
> simple, sorry I couldn't find anyting.
>
> I am using 1.3.27 on redhat 7.2.
> Also, on Win32, the situation is different - the server does issue the 302
> code and the browser behaves as expected.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org