httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] Custom Error Handling
Date Tue, 16 Jun 2009 10:49:35 GMT
Alan Wilson wrote:
> Thanks - that makes sense, using a test along the lines of
> print "Content-Type: text/html\n";
> print "Status: 302 Moved\nLocation:\n\n";
> print "\n"; 
> Seems to do what I want.
That is strange, and I am surprised it works (but I don't know everything).
The way you are doing it above, you are still sending an (implicit) HTTP 
response code of 200 (OK), and then sending a HTTP header "Status:", 
which is normally not how these things work.

Assuming you are not using, I would have written it as :

print "302 Moved\n";
print "Location:\n\n";

In perl, and using the CGI module, you would have something like :

use CGI qw/:standard/;
my $q = new CGI;
print $q->redirect(-uri=>'http://somewhere.else/in/movie/land',
exit 1;


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message