Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z - Internet FAQ Archives

FAQ: Frequently Asked Questions about CGI Programming
Section - 3.13 Can I redirect users to another page?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Neighborhoods ]

Top Document: FAQ: Frequently Asked Questions about CGI Programming
Previous Document: 3.12 Can I identify users/sessions without password protection?
Next Document: 3.14 Can I run a CGI script without returning a new page to the browser?
See reader questions & answers on this topic! - Help others by sharing your knowledge

For permanent and simple redirection, use the HTTPD configuration file:
it's 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 don't forget to escape the URL!

User Contributions:

Comment about this article, ask questions, or add new information about this topic: