Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

merlyn (47)

AOL IM: realmerlyn (Add Buddy, Send Message)
Yahoo! ID: realmerlyn (Add User, Send Message)

See my home page [].

Journal of merlyn (47)

Tuesday December 03, 2002
11:15 AM

internal redirect, apache mod_cgi, and

[ #9247 ]
Recently, there's been a discussion on PerlMonks about how an internal redirect wasn't working. I traced it down to a few lines of mod_cgi.c in the Apache source code. For an internal redirect, a location header must be present, begin with a slash (no hostname) and the status must be 200.

Unfortunately, the standard redirect routine defaults the status to be 302. Thus, you have to remember to write the redirect as

print redirect(-uri => '/new/location', -status => 200);


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.