Forum Discussion

tim_111717's avatar
tim_111717
Icon for Nimbostratus rankNimbostratus
Sep 25, 2008

session-id persistence

hi - i need to write an irule that will set persistence based a session-id passed in the http header. any pointers are appreciated, i've looked around alot on the site but looks like i need a variation of some that are already out there but not sure, basically am looking for:

 

 

if client sends session id in http header, persist. seems simple enough, no?

 

 

-cheers

1 Reply

  • That should be relatively easy. Here's an example from another post. For details on findstr, you can check the wiki page (Click here)

     
     when HTTP_REQUEST { 
        persist uie [findstr [HTTP::query] "user=" 5 "&"]  
     } 
     

    For a URL of http://example.com/path/to/object.type?param1=value1&param2=value2, HTTP::uri would return "/path/to/object.type?param1=value1&param2=value2", HTTP::path would return "/path/to/object.type" and HTTP::query would return "param1=value1&param2=value2"

    Aaron