CGI Programming / Scripts Question:

Download Job Interview Questions and Answers PDF

Can I redirect users to another page?

CGI Programming Interview Question
CGI Programming Interview Question

Answer:

For permanent and simple redirection, use the HTTPD configuration file:
it is much more efficient than doing it yourself. Some servers enable
you to do this using a file in your own directory (eg Apache) whereas
others use a single configuration file (eg CERN).

For more complicated cases (eg process form inputs and conditionally
redirect the user), use the "Location:" response header.
If the redirection is itself a CGI script, it is easy to URLencode
parameters to it in a GET request, but dont forget to escape the URL!

Download CGI Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do I launch a program (.exe) that is located on the Server from a Web page?Is it possible to set a cookie and then redirect a return visitor to a different url all using cgi?