Forum Discussion
Steve_Spencer_1
Nimbostratus
Jul 05, 2005Direct Access irule problem...
Hello,
I have built (copied) the following irule and am having trouble making it do what i want... I want a url like http://view.usg.edu/dvw5 to go directly to the web root on the machine named dvw5 (or http://10.1.1.5/ in the class below).
here's the class:
class db300_direct {
dvw5 10.1.1.5:8000
dvw6 10.1.1.6:8000
}
and here's the irule:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/dv" } {
set urimbr [substr [HTTP::uri] 1 "/"]
log local0. $urimbr
set node [findclass $urimbr $::db300_direct " "]
log local0. $node
pool VistaWebApps member $node
}
}
Now according to my log, $urimbr is what i expect, and $node is what i expect. I get a 404 error from the machine. When i captured the packets and looked at the trace, i see that the packet is in fact getting directed to the $node as i expect, but the thing i don't understand, (and haven't been able to figure out with much trial and error) is that it is being directed to http://10.1.1.5/dvw5 and since there is no directory dvw5 under the web root, the 404 error is understandable.
The thing is, i don't want the request to go to http://10.1.1.5/dvw5 -- i want it to go to http://10.1.1.5/
If someone would be so kind as to help me understand what i am doing wrong i would be most gratefull.
Thanks in advance!
- Colin_Walker_12Historic F5 AccountMorning sspencer,
- drteeth_127330Historic F5 AccountAlternatively, you could rewrite the request without redirecting.
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