Forum Discussion
Steve_Hellams_1
Nimbostratus
Jun 23, 2006Trying to Redirect Outside URI to INSIDE URI
Please Help!
I am trying to re-direct a URI to a different URI on the inside Host
Inside host: 1.2.3.4 on Port 7800
with a URI of /SEH/SEHPROXY
Outside Request:
HTTP://SEHTEST.SEH.COM/SEH/DIR1/DIR2/DIR3/SCRIPT_do.prx
must be mapped to URI of /SEH/SEHPROXY on the inside host using the pool
Here is my script that is not working:
when HTTP_REQUEST {
if {[HTTP::uri] contains "/SEH"}{
HTTP::uri "/SEH/SEHPROXY"
POOL INSIDEHOST1
}
}
I tried the following change and that did not work: (HTTP::uri "/SEH/SEHPROXY")
If I use the following URL and take out the HTTP::uri statement,
it works, but that is not the answer:
HTTP://SEHTEST.SEH.COM/SEH/SEHPROXY/DIR1/DIR2/DIR3/SCRIPT_do.prx
I need it to work without the SEHPROXY directory being in the URI because
that is the path of multiple applications behind that directory on the inside
hosts.
PLEASE PLEASE HELP!! Thanks!
- hoolio
Cirrostratus
Hi,set URI, replacing all instances of 'original' with 'replacement' HTTP::uri [string map { original replacement } [HTTP::uri]]
- scott_j_111129
Nimbostratus
Hi Steve,If the URI starts with the the string /SEH if {[HTTP::uri] starts_with "/SEH"}{ strip off the first 5 characters, then replace with /SEH/SEHPROXY/ set workingUri [substr [HTTP::uri] 5] HTTP::uri "/SEH/SEHPROXY/$workingUri" pool INSIDEHOST1 }
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