[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] CGI-created files aren't found



+-After the file is updated, I want the web-user to go right to the
+-file, so I have   print "Location: http://somewhere/file.txt\n\n";

I'm not sure why that doesn't work. The following works for me...

# MacPERL CGI redirect...
# $use_url is any URL string, such as "http://www.server.org/doc.html"

print "HTTP/1.0 302 Found\n";
print "MIME-Version: 1.0\n";
print "Server: WebSTAR/1.2.4\n";

print "Location: $use_url\n";
print "URI: $use_url\n";

Although the MacPERL CGI glue will generate proper headers for
you, it's generally considered wiser to do the whole thing
yourself (if for no other reason than that the "server" line won't
be returned otherwise, which for the Mac Webmaster community is
a bad thing as we need to make sure every damn Mac webserver is
accounted for before another clueless journalist re-declares
Apple DOA) (rant off).

Your script could be failing because you're not using the "URI"
line, which is in the current HTTP spec for redirection. It could
be that your browser expects to find this line and fails if it
doesn't.

--
matt.