Wasim, Can you be more accurate regarding the terms used.
Server 1 is a internal server ? Or a Virtual Server ? I suppose server 1 and 2 are internal server.
I really need a real example with the real fqdn. Because http://laserfiche/Laserfiche8 is not a public URL. So you can't redirect an internet user to this url.
Redirect is a 302 HTTP code. So the user will be redirected to this URL. And unfortunately, this URL is not routed on internet.
What you are requesting is not redirect but pool selection. Actually, you want to select the right server depending the hostname.
You need to create 3 pools :
- Pool_1 : IP address server 1 + port 80
- Pool_2 : IP address server 1 + port 8080
- Pool_3 : IP address server 2 + 7001
Create an iRule like that (just an example)
when HTTP_REQUEST {
if { [HTTP::host] eq "https://care.abc.com" } {
pool Pool_2
}
}
In this case, when the user will connect to https://care.abc.com, the BIGIP will open a connection to the server 2 with port 8080.
You need to adapt this irule for your use case with the URI change as well. Keep in mind that the user is on internet and the hostname will never change on his side. Your irule will select the right server and change the port and the URI if needed.