Forum Discussion
1 Reply
Sort By
Hi bbukane,
to explain your entire iRule you need at least post the entire iRule... 😉
set uri [string map -nocase {"pqrs/xyz" "pqrs"} [HTTP::uri]] HTTP::uri $uri
The iRule snipped above will read the currently requested HTTP::uri (e.g. /pqrs/xyz/file.html) and replace any ocourence of the string "pqrs/xyz" with "pqrs" while ignoring possible upper/lower cases for the search pattern. It will then temporary store the result of the replacement into the variable
and then overwrite the currently requested$uri
with the just computed value ofHTTP::uri
before forwarding the request to the backend server.$uri
Incomming Request:
http://sitename/pqrs/xyz/file1.html
Forwarded Request:
http://sitename/pqrs/file1.html
Cheers, Kai