When trying to use 'redirect', my 'starting' page will no longer load (returning the 500 error). Not sure what I'm doing wrong here. FYI: If I remove the redirect code, the page loads just fine. Here's the code:
%%[var @ne,@jw,@ca,@co,@np,@le,@pu,@subkey,@neoch,@jwoch,@caoch,@leoch,@puoch,@npoch,@coochset @subkey = Lookup('Site License Opt Out','SubscriberKey','EmailAddress',requestparameter('ea')) if not(empty(@subkey)) THENif requestparameter('display')=='optin' THEN set @neoch = 'TRUE' set @jwoch = 'TRUE' set @caoch = 'TRUE' set @leoch = 'TRUE' set @puoch = 'TRUE' set @npoch = 'TRUE' set @cooch = 'TRUE'ELSEif not(empty(requestparameter('neop'))) THENset @neoch = 'TRUE'ELSEset @neoch = 'FALSE'ENDIFif not(empty(requestparameter('jwop'))) THENset @jwoch = 'TRUE'ELSEset @jwoch = 'FALSE'ENDIFif not(empty(requestparameter('caop'))) THENset @caoch = 'TRUE'ELSEset @caoch = 'FALSE'ENDIFif not(empty(requestparameter('leop'))) THENset @leoch = 'TRUE'ELSEset @leoch = 'FALSE'ENDIFif not(empty(requestparameter('puop'))) THENset @puoch = 'TRUE'ELSEset @puoch = 'FALSE'ENDIFif not(empty(requestparameter('npop'))) THENset @npoch ='TRUE'ELSEset @npoch = 'FALSE'ENDIFif not(empty(requestparameter('coop'))) THENset @cooch = 'TRUE'ELSEset @cooch = 'FALSE'ENDIFENDIF UPSERTDATA('Site License Opt Out',1,'SubscriberKey',@subkey,'EmailAddress',requestparameter('ea'),'nestatus',@neoch,'jwstatus',@jwoch,'castatus',@caoch,'pustatus',@puoch,'costatus',@cooch,'npstatus',@npoch,'lestatus',@leoch)ENDIF ELSE Redirect(cloudpagesURL(2024,'display','Stuff'))ENDIF]%%