ODBiC Discussion Board


RE: REDIRECT not working, Adrian Fitton, 05-29-2009

Looks like a bug

by Roger Harris, June 8, 2009 18:16

It appears that the REDIRECT does not work properly inside the WHILE loop. It is causing an exit from the loop, as it should but then it seems to lose track of the redirect URL. I'll need to look at it, but a work-around would be something like this:

<%SET array00 = "google";SET array01 = "[REDIRECT_URL]";SET arrayUbound = 0;
WHILE match($query_string$,"/");SET query_string_trim = $split(query_string, "/");ENDWHILE;
SET i = 0;
WHILE $i$ <=$arrayUbound$;
	if $var(array$i$0) = $query_string$;
		SET url=$var($eval(array$i$1));
		BREAK;
	endif;
ENDWHILE;
IF $url$;
	REDIRECT $url$;
ENDIF %>


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


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