Difference between redirects

Discussion in 'Perl Misc' started by googleid2003@yahoo.com, Jan 22, 2005.

  1. Guest

    I know nothing about perl, so a friend of mine wrote a cgi script for
    me to do a redirect on my website based on user input from a html form
    using a variable $userName. The piece of code that does this:

    print "Content-type:text/html\n\n";

    print "<html><head><meta http-equiv=\"refresh\"
    content=\"0;url=$path$userName\"></head><body></body>\n";

    What's the pros/cons, if any, or difference between this and the
    following:

    print "Location: http://www.somesite.com/directory/$userName\n\n";

    They seem to do the same thing, and I wonder which is "better".
    Thanks,
    Mike
     
    , Jan 22, 2005
    #1
    1. Advertising

  2. wrote in news:1106424985.003262.168740
    @c13g2000cwb.googlegroups.com:

    > I know nothing about perl, so a friend of mine wrote a cgi script for
    > me to do a redirect on my website based on user input from a html form
    > using a variable $userName. The piece of code that does this:
    >
    > print "Content-type:text/html\n\n";
    > print "<html><head><meta http-equiv=\"refresh\"
    > content=\"0;url=$path$userName\"></head><body></body>\n";
    >
    > What's the pros/cons, if any, or difference between this and the
    > following:
    >
    > print "Location: http://www.somesite.com/directory/$userName\n\n";


    This is not a Perl question. It is a CGI question. As such, it is off-
    topic here. You'll better off posting it to a CGI group such as
    comp.infosystems.www.authoring.cgi

    See also http://cgi-spec.golux.com/cgi-120-00a.html#8.0

    Sinan.
     
    A. Sinan Unur, Jan 22, 2005
    #2
    1. Advertising

  3. Guest

    Sorry about that. Thanks for the info.

    A. Sinan Unur wrote:
    > wrote in news:1106424985.003262.168740
    > @c13g2000cwb.googlegroups.com:
    >
    > > I know nothing about perl, so a friend of mine wrote a cgi script

    for
    > > me to do a redirect on my website based on user input from a html

    form
    > > using a variable $userName. The piece of code that does this:
    > >
    > > print "Content-type:text/html\n\n";
    > > print "<html><head><meta http-equiv=\"refresh\"
    > > content=\"0;url=$path$userName\"></head><body></body>\n";
    > >
    > > What's the pros/cons, if any, or difference between this and the
    > > following:
    > >
    > > print "Location: http://www.somesite.com/directory/$userName\n\n";

    >
    > This is not a Perl question. It is a CGI question. As such, it is

    off-
    > topic here. You'll better off posting it to a CGI group such as
    > comp.infosystems.www.authoring.cgi
    >
    > See also http://cgi-spec.golux.com/cgi-120-00a.html#8.0
    >
    > Sinan.
     
    , Jan 22, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,405
  2. Hanover
    Replies:
    2
    Views:
    3,467
    Karl Seguin
    Sep 8, 2005
  3. Santa
    Replies:
    1
    Views:
    1,128
    Mark A. Odell
    Jul 17, 2003
  4. arnuld
    Replies:
    33
    Views:
    1,203
  5. Evan
    Replies:
    1
    Views:
    271
    Kevin Spencer
    Feb 19, 2008
Loading...

Share This Page