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,@cooch
set @subkey = Lookup('Site License Opt Out','SubscriberKey','EmailAddress',requestparameter('ea'))
if not(empty(@subkey)) THEN
if 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'
ELSE
if not(empty(requestparameter('neop'))) THEN
set @neoch = 'TRUE'
ELSE
set @neoch = 'FALSE'
ENDIF
if not(empty(requestparameter('jwop'))) THEN
set @jwoch = 'TRUE'
ELSE
set @jwoch = 'FALSE'
ENDIF
if not(empty(requestparameter('caop'))) THEN
set @caoch = 'TRUE'
ELSE
set @caoch = 'FALSE'
ENDIF
if not(empty(requestparameter('leop'))) THEN
set @leoch = 'TRUE'
ELSE
set @leoch = 'FALSE'
ENDIF
if not(empty(requestparameter('puop'))) THEN
set @puoch = 'TRUE'
ELSE
set @puoch = 'FALSE'
ENDIF
if not(empty(requestparameter('npop'))) THEN
set @npoch ='TRUE'
ELSE
set @npoch = 'FALSE'
ENDIF
if not(empty(requestparameter('coop'))) THEN
set @cooch = 'TRUE'
ELSE
set @cooch = 'FALSE'
ENDIF
ENDIF
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
]%%