"Richard A. Evans" wrote:
> 
> > I have a script named redirect.pl that has the following line of code
> 
> > print $co->redirect('/new_page.html');
> 
> > The script redirects to the appropriate page. However, the URL that
> appears
> > at the browsers address bar remains  /cgi-bin/redirect.pl . How can I
> force
> > the address location to change as well?
> 
> I use a script like this and it works fine:
> 
>   #!/usr/bin/perl -T
>   use CGI;
>   $q = new CGI;
>   print $q->header(
>     -type => "text/html",
>     -expires => "-1d",
>     -location => $q->param('redir')
>   );
> 
> Run the script as redirect.pl?redir=http://www.whereyouwanttogo.com
> 
> I left out any error checking on the redir parameter as I assume I will
> always used the script correctly.

This works equally well for me:

        print "Location: http://www.xyz.com/\n\n";;

May depend on your server/browser somewhat.
-- 
  ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to