Forum Discussion
brad_11452
Nimbostratus
Mar 23, 2007Persist on uri argument
I am new to irules and am trying to set up persistence based on an argument passed in the uri. Here is a sample:
http://mydomain.com/test.jsp?clientIp=10.1.1.47
So I want to persist on 10.1.1.47
Here is what I have so far:
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
set path [URI::path [HTTP::uri]]
set query [URI::query [HTTP::uri]]
set ip [URI::query [HTTP::uri] "clientIp"]
persist uie $ip
}
I can see records in the persistence tables that contain the IP address but persistence does not seem to be entirely working.
Any thoughts or help would be greatly appreciated.
Thanks
- Colin_Walker_12Historic F5 AccountI think you can simplify your rule a little.
when HTTP_REQUEST { persist uie [URI::query [HTTP::uri]] }
- brad_11452
Nimbostratus
Thanks Colin, that does the trick in my quick little tests!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects