Forum Discussion
irule for redirecting to VIP with uri
i have a server in internal segment which needs to be accessed by both internal and external users. i want to create a virtual server which will be exposed over internet which should redirect me to this internal server with a uri appending to it. ex: if my internal server is 10.1.1.1 and i have a page which needs to be displayed ex: http://10.1.1.1/admin to internal users coming from 10.0.0.0/8 segment and i have another page http://10.1.1.1/external which will be displayed to internet users. I will be exposing my virtual server ip but not the internal Ip. Is it possible to do this?? i tried the below but there is a redirect loop.
when HTTP_REQUEST { if { ([HTTP::uri] contains "/")}{ if { ( [IP::addr [IP::client_addr] equals 10.0.0.0/8]) }{ HTTP::redirect http://public-ip-of-virtualserver/admin } else {HTTP::redirect http://public-ip-of-virtualserver/external} } }
Please help. Thanks in advance.
1 Reply
- What_Lies_Bene1
Cirrostratus
Hmmm, can be clarify the logic a bit please? Why not have a VS enabled on the internal vlan and another on the external, with different IPs but using the same pool. Then an iRule to modify the URI?
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