Forum Discussion
HTTP::URI redirect to another Pool
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "content1" } {
pool content_pool_1
} elseif { [HTTP::uri] starts_with "/abc" } {
pool abc_servers
}
}The idea being that:
for users browsing to www.website.com/content1 >> they go to the content_pool_1 servers, everything else goes to content_pool_2 servers
But after I enable the rule, I keep getting 404 errors in server in content_pool_2.
The Virtual Server currently points to content_pool_2... how do I/do I need to somehow point the Virtual Server to both content_pool_1 and content_pool_2?
Right now, content_pool_1 isn't assigned to a Virtual Server... does it need to be?
Doesn't seem like this should be so difficult...
47 Replies
- r_dynamo_79563
Nimbostratus
It works for redirecting "http://www.suppose.com" to "http://www.suppose.com/psp/rewrite/redirection", but I also want it to work for "http://www.192.168.1.1" to "www.192.168.1.1:9200/psp/rewrite/redirection", and the other pool member from "http://192.168.1.2" to "http://192.168.1.2:9200/psp/rewrite/redirection"
Thanks,
r_dynamo - nitass
Employee
but I also want it to work for "http://www.192.168.1.1" to "www.192.168.1.1:9200/psp/rewrite/redirection", and the other pool member from "http://192.168.1.2" to "http://192.168.1.2:9200/psp/rewrite/redirection"i thought 192.168.1.1 and 192.168.1.2 is pool member ip (not virtual server ip). when browsing http://192.168.1.1 or http://192.168.1.2, does it go through bigip?
did i misuderstand anything here?? - r_dynamo_79563
Nimbostratus
Your understanding is correct, actually those two IP pool members are behind the f5. Need not only a browser rewrite in the iRule to append "psp/rewrite/redirection" to any HTTP request, but also if the pool members are typed within "http//:", then they will resolve to "http//:[Node IP address]:[listening port]/psp/rewrite/redirection"
Thanks,
r_dynamo - nitass
Employee
sorry to confuse. i meant if it is not virtual server ip, i do not think bigip can do rewriting or redirection request. - What_Lies_Bene1
Cirrostratus
Yes, if you want to connect to the pool members directly and apply iRules etc. you'll need a Virtual Server (and Pool with a single member) for each one that can act as the necessary proxy. These VS's would do the port translation automatically and would need an iRule applied for the redirection only. - r_dynamo_79563
Nimbostratus
Now suppose if I configure a separate Virtual Server, and Pool with each member, what will be the iRule for each VS, to translate "http://[Node IP address]" into "http//:[Node IP address]:[listening port]/psp/rewrite/redirection"? Or that cannot be done?
r_dynamo - Mohamed_Lrhazi
Altocumulus
It would be the exact same iRule given above.
But to do this, you would need to change the IP addresses of the nodes... which would not make sense... because you will then have the exact problem again.. what if the clients try to access the nodes directly, with their new IP addresses...
Might be simpler to configure you web servers to redirect any traffic not addressed to them with correct Host header. - What_Lies_Bene1
Cirrostratus
You don't have to change the port, LTM will do that for you automatically. - r_dynamo_79563
Nimbostratus
This time I need an iRule that not only does a http to https redirect with www.suppose.com , but also does a rewrite by adding "psp/rewrite/redirection" to the redirected https request. So finally the client is redirected to "https://www.suppose.com/psp/rewrite/redirection", upon acessing "<http://www.suppose.com>". SSL offloading will be occuring from the F5 itself.
Thanks,
r_dynamo - What_Lies_Bene1
Cirrostratus
Is this only when there is no other HTTP path present? In other words, only when no URI is entered?
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