Forum Discussion
URI Append
Hi Experts,
Could you please help me write the irule to append a string to existing URI? Below are the details. Can it be just a rewrite and not redirect?
The idea is to append/insert a URI, Can i have it as variable? coz it should take the word/strings before the domain name and use it as the URI to be added. Original URL sent by user: online.abc.com/ova/login.jsp traffic sent to backend server should be: online.abc.com/online/ova/login.jsp
Thanks in advance for the help!
- Daniel_Varela
Employee
Here an example:
when HTTP_REQUEST { if {[HTTP::uri] eq "/ova/login.jsp" and [HTTP::host] eq "online.abc.com"} { HTTP::uri /[getfield [HTTP::host] "." 1][HTTP::uri] } }
- Lee_Sutcliffe
Nacreous
Hi, you can try this (you may want to add some conditioning, but you get the idea)
when HTTP_REQUEST { set domainPrefix [getfield [HTTP::host] "." 1] HTTP::uri /$domainPrefix[HTTP::uri] }
Recent Discussions
Related Content
* 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