Forum Discussion
neeraj_66310
Nimbostratus
Dec 13, 2007I need to remove host from url and send it to particular pool
I am novice for creating irule, Kindly help me out for below requirement:--
user make request for one of 3 urls as below:--
1)http://main.test.com
2)http://main.test.com/first.test...
neeraj_66310
Nimbostratus
Dec 18, 2007Thanks Joe,
From your reply I have created irule as below:--
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/first.test.com*" { HTTP::header replace "Host" "first.test.com"
HTTP::uri [string map { "first.test.com" "" } [HTTP::uri]]
pool pool_first }
"/second.test.com*" {
HTTP::header replace "Host" "second.test.com"
HTTP::uri [string map { "second.test.com" "" } [HTTP::uri]]
pool pool_second
}
default {
pool poolmain
}
}
}
I have modified your previous irule according to your suggestion.I think it should work.
The whole scenario is for load balancing.Sap portal access.
But I was not able to test above Irule, as now we are testing scenario in differenct way.In which case, host need not be replaced and also uri rewriting is not required.
Only port is changed by stream profile so server response to user make request on port 8001 changed to request on 80 port to first.test.com.
And in host entries we map all three FQDN (main.test.com, first.test.com and second.test.com) to same Ip address, which is Big ip Virtual server ip address. Here we are successfull in getting the second page but we are not able to get images(jpg)(page content), there we are getting red cross symbol.
We are assuming that this problems reason is, as SAP server is already sending image file in compressed format, so Big IP box is not able to understand that.
If I come to some solution, I will let you know, as that could be usefull to other Forum peoples who may face this type of problem.
Secondly if I ever test our scenario with your suggested irule, I will definitely reply whether it has worked or not(that irule I already shown above only I have not tested it yet)
Joe thanks again for your valuable irule, and your suggestion on further modifying it according to scenario.
Thanks.
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