Page 1 of 1

ResponseRedirect

Posted: Thu Aug 19, 2010 6:28 pm
by cmo
Folk:

I'm sure someone has solved this. How can you redirect a user using a functioncall, but without a post function? Whenever I run this code I don't get a redirect, I just see the header output. I use this all the time on asp/php server side scripting. I'm trying to demonstrate this on a SBL2e.

for example, if on a page there is a functioncall:

Code: Select all

<!--FUNCTIONCALL gotonewpage() -->
to the function

Code: Select all

void gotonewpage(int sock, PCSTR url){
RedirectResponse(sock,"index.htm");
}
The output on a browser is:
HTTP/1.0 302 Redirection Location: index.htm
(followed by whatever else was in the HTML)

Again, this works fine in a post function. But, how can you force a redirect without using a post? Thanks in advance.

Re: ResponseRedirect

Posted: Fri Aug 20, 2010 10:08 am
by greengene
i'm not sure what problem you are seeing, but i redirect all the time
from GETs and the expected redirected page is displayed.
i am doing this in my own GET handler that was set with
SetNewGetHandler().

Re: ResponseRedirect

Posted: Fri Aug 20, 2010 10:12 am
by pbreed
Not as easy on the SBL2E it uses a whole differnt web server scheme than the normal platforms.

The proper way is to put a functioncall in the head section of the web page and then do a refresh meta tag.

See:
http://webdesign.about.com/od/metatagli ... 80300a.htm

Paul