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 ...
Kai_Wilke
MVP
Jan 29, 2018Hi 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
$uri and then overwrite the currently requested HTTP::uri with the just computed value of $uri before forwarding the request to the backend server.
Incomming Request:
http://sitename/pqrs/xyz/file1.html
Forwarded Request:
http://sitename/pqrs/file1.html
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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