iRules are a fantastic feature of the F5.
Sometimes you need to do operations based upon the actual URL which has been typed and this page should give you a handy lookup guide to show which variables give up which parts of the URL.
Example URL: http://example.com/directory1/directory2/directory3/filename.html?
argument1=value1&argument2=value2&argument3=value3 

VariableDescriptionExample
[HTTP::host]hostnameexample.com
[HTTP::uri]Everything after the hostnameexample.com/directory1/directory2/directory3/filename.html
?argument1=value1&argument2=value2&argument3=value3
[HTTP::path]the directory path and file name/directory1/directory2/directory3/filename.html
[HTTP::query]everything after the ?argument1=value1&argument2=value2&argument3=value3
[URI::path [HTTP::uri] depth]number of directoriesvalue of 3
[URI::path [HTTP::uri] 1 1]
directory 1
directory1
[URI::path [HTTP::uri] 2 2]
directory 2
directory2
[URI::path [HTTP::uri] 3 3]
directory 3
directory3
[URI::query [HTTP::uri] “argument1”]
argument 1
value1
[URI::query [HTTP::uri] “argument2”]
argument 2
value2
[URI::query [HTTP::uri] “argument3”]
argument 3
value3
[URI::basename [HTTP::uri]]
file name
filename.html