Hi!

On Fri, Jan 24, 2003 at 10:59:50AM +0000, koudjo ametepe wrote:
(posted back to [EMAIL PROTECTED])

> I want to send a the visitor to a page according to the script cgi's params 
> .I have a default url .
> If the  params are empty i send him to the default page or to the specific 
> page (contained in the params) he wanted !!

If you use POST as the action of the form generating the request, you might
want to look at this:
http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting_POST_Requests

Or, to remove the posted data, do:
   $r->method_number(M_GET);
   $r->method('GET');
   $r->headers_in->unset('Content-length');

and then redirect:           
   $r->header_out(Location => $redirect);
   $r->status(302);
   return REDIRECT;

That's the way I usually do redirects without any problems.

But again: Are you using mod_perl??

Because redirecting works slightly different under mod_cgi / CGI.pm

And did you look at the questions Lee Goddard asked?


-- 
#!/usr/bin/perl                               http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Reply via email to