Hi Lolo,
Looking at the original URI I am going to make some assumption that you basically want to strip out the session number? Also the blabla.xxx is the some kind of file where .xxx is the extension. I am also assuming that the LTM is terminating the SSL Connection.
If that is the case the iRule would look something like the following:
when HTTP_REQUEST {
if { [HTTP::host] eq "hostname")} {
HTTP::redirect "https://[HTTP::host][URI::path [HTTP::uri] 2][URI::basename [HTTP::uri]]"
}
}
To break this down:
HTTP::host will contain the hostname of the URL
[HTTP::uri] = the entire URI "/(S(session number))/blabla/blabla.xxx"
[URI::path [HTTP::uri] 2] = will look at the path depth at 2. This will result in finding /blabla
[URI::basename [HTTP::uri]] = will look for the basename of the path which is "blabla.xxx"
Here is a article that talks about parsing a URI (
Click here)
I hope this helps
Bhattman