Forum Discussion
Server and URI Redirection using iRule
Hi Experts,
We are creating an irule for reporting section of a website, we have main site working fine but the reporting is having issue via iRule...
Main Site....
server url - https://customer.com/wrenchentservice/wrenchentservice.asmx Report url - https://customer.com/Report/Basic.aspxThe Server url is working fine, bu the report url is not, we have configured following irule.
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] eq "wrench.enoc.com" ) and ( [string tolower [HTTP::uri]] starts_with "/Report/" ) } {
pool WRENCH_POOL
}
if { [string tolower [HTTP::host]] equals "wrench.enoc.com" } {
pool WRENCH_POOL
}
}
6 Replies
- nathe
Cirrocumulus
First observation, you've got string tolower but Report has a capital R. Change this to /report.
Does that help?
- WUM_113639
Nimbostratus
Actually, I need to put all in caps, so I have removed string to lower and written /REPORT/ in the irule URI.
But the results are same, the server url is working but report url is not working
- nathe
Cirrocumulus
Ok. Bit confused though. Cos if the report uri misses the first if statement then it will hit the second, due to the host name, and go to the same pool
- WUM_113639
Nimbostratus
Yes, I have tried "/" with only one if condition, even then, only server url is working only.
Is there anyway, on LTM, we can see, what the pool member is sending in HTTP response to the customer request? without doing anything on the server. using TCPDUMP?
- nathe
Cirrocumulus
You can use the "LB::server addr" in the LB_SELECTED event to log this
- Snl
Cirrostratus
hello Experts both URL working fine in the server it self but when we try from F5 vip with Irule its not working Actual server url is https://customer.abc.com/Report/Basic.aspx server responding as -https://customer.abc.com/REPORT/Basic.aspx?
below is the irule tried when HTTP_REQUEST { if { ( [string tolower [HTTP::host]] equals "customer.abc.com" ) } { pool ABC_POOL }
is anything to do with uri /Report to /REPORT response from server when goes to client
please help
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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