Forum Discussion
neeraj2901_2661
Nimbostratus
Mar 01, 2017Single server for Multiple URLs
I have 5 URLs which has single server. VIP1-VIP5 and one server (Server1) Server1 has 5 URL based on URI, like:
Server1.com/test/id=1, Server1.com/test/id=2, Server1.com/test/id=3 , Server1.com/test/id=4, Server1.com/test/id=5
I want that when user types:
- VIP1.com gets redirected to VIP1.com/test/id=1
- VIP2.com gets redirected to VIP2.com/test/id=2
goes on
1 Reply
- Vijay_E
Cirrus
You can use 1 VS with a pool that has 1 pool member (server). Use iRule to redirect based on the incoming domain. The following iRule is untested and would have to be modified to suit your specific use-case:
When HTTP_REQUEST { if { [HTTP::uri] eq "/" } { switch -glob [HTTP::host] "VIP1.com" { HTTP::redirect [HTTP::host]/test/id=1 } "VIP2.com" { HTTP::redirect [HTTP::host]/test/id=2 } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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