Results 1 to 3 of 3

Thread: redirecting in CGI

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    Question redirecting in CGI

    is there a way to redirect a user to another page in CGI?

    i tried using:

    location: file.cgi
    and
    print "location:file.cgi";

    but I can't seem to let it work.

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Set the Location HTTP header before sending anything else (besides any other HTTP headers), and finish the headers by adding two newline characters.

    Perl:
    Code:
    print "Location: file.cgi\n\n";
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37
    thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width