[ back to toc ]

redirect method

Date: 2002/01/20 09:54

Q:
I have another question about the CGI.pm methods.
Here is a bit of code that is giving me fits.

unless($po_id = cookie("po_id"))
{SetCookie();
}
GetInput();
GetLastOrder();
RewriteLastOrder();
$nextstep = "http://$base/cgi-bin/orderUpdate.cgi\n\n";
print redirect(-url => $nextstep);

Just FYI $base is set to server_name. Everything works fine (I've used a
breakpoint code to check) until I try to print the redirect. I then get a
403 error. What gives?

Thanks for your time and help,

*NAME-DELETED*

A:
This is most probably because you are not authorized to run the
orderUpdate.cgi Check the permissions of that file. I think that the
redirect works fine and you get the 403 (Not authorized) error from the
page where you were redirected to.

Test it printing a page that does not redirect but displays a link and
requires you to click on that.

Regards,
Peter

Q:

I Changed the address to a simple static page ($base/home.shtml) and I'm
still getting the 403 error. Now what do I do?

You know, this stuff drives me nuts sometimes. I really appreciate your
time and effort. The quickness of your responses are awesome.
*NAME-DELETED*
A:
Sometimes I sleep.

Nofurther ideas.

Peter

[ back to toc ]