Forum Discussion
BB16
Nimbostratus
Jan 29, 2018Please explain set uri line below irule & entire irule
co_d10_xyz
"/pqrs/xyz/*"
{
HTTP::header insert X-Forwarded-For [IP::remote_addr]
set uri [string map -nocase {"pqrs/xyz" "pqrs"} [HTTP::uri]]
HTTP::uri $uri
pool kt_dev_xyz
}
Have a close look for pqrs & xyz, thank you
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
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