ResponseRedirect

Discussion to talk about software related topics only.
Post Reply
cmo
Posts: 20
Joined: Sat Jul 24, 2010 4:20 pm

ResponseRedirect

Post 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.
greengene
Posts: 164
Joined: Wed May 14, 2008 11:20 am
Location: Lakeside, CA

Re: ResponseRedirect

Post 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().
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: ResponseRedirect

Post 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
Post Reply