ODBiC Discussion Board

RE: REDIRECT command question, Ben Blundell, 03-02-2006

Code the redirection with a HEADER instead

by Roger Harris, March 2, 2006 07:17

In the current version, there isn't any way to prevent the session ID from being appended to the redirection URL, but since redirection is accomplished with a "Location" response header, it's easy to code redirection with the HEADER command:

HEADER Location: url;
(where "url" is the URL that you want to transfer to.) For this to work, however, there can't be any other output produced by the script before this command is executed. (When a script produces its first output, any output other than the HEADER command will cause ODBscript to send the standard response headers before sending that output, so browsers will not recognize any headers after that.) Response headers need to be terminated with an empty line, hence the empty HEADER "" line.


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.