KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using SEND HTTP REDIRECT
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: July 27, 2001
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

SEND HTTP REDIRECT will work only within a 4D Web Process. This command works by altering the HTTP header of the reply. When you call this command, 4D will enter this as the status of the request when it replies:

HTTP/1.0 302 Moved Temporarily

Any other content you may have sent (via SEND HTML FILE, etc.) will never be seen by the web browser. This is because when the browser sees the "302" message, it immediately makes a new request for whatever URL it was supplied with by the SEND HTTP REDIRECT command.

If you re-direct to another URL served by the 4D Web Server, it is important to know that the re-directed URL is handled by another 4D process. The current selection & state of variables will not necessarily be the same for the re-directed URL since they were part of the process that issued the SEND HTTP REDIRECT command.