Forum Discussion

Tom_Thunem_9204's avatar
Tom_Thunem_9204
Icon for Nimbostratus rankNimbostratus
Nov 10, 2009

redirect based upon cookie

not sure of the syntax to accomplish the following...

 

 

If ( HTTP Request is for http://someplace.com AND HTTP Request doesn’t have cookie X )

 

{

 

// Then Redirect to a hardcoded url like:

 

HTTP::redirect “http://someplace-else.com/some/path/somepage?param=value&param2=value2”

 

}

 

 

not sure how to determine if a cookie does NOT exist.

1 Reply

  • You can logically not 'HTTP::cookie exists':

     

     

    if {[string tolower [HTTP::host]] eq "someplace.com" and not ([HTTP::cookie exists "cookie_x"])}{

     

     

    Aaron