Forum Discussion
iRule URI
Hi All, Hope your fine,
i have URL with three URi http://KOR/* >>>> VS1 http://KOR/test_cc >>>> VS2 http://KOR/Prod_cc >>>> VS3
i have one Pool (Pool= Pool_KOR) configured with three VS.
i want an iRule to restrict access for each uri to each vs with same pool.
4 Replies
- KOR_124005
Nimbostratus
thank you BR - Restrict in terms of IP? Or do you ONLY want people to be able to access the uri's specified? You can't use the same dns record for different VS', the load balancer chooses VS by ip+port (or wildcard), not dns.
- KOR_124005
Nimbostratus
seconde option Or do you ONLY want people to be able to access the uri's specified thank u If you want to restrict access to a specifi uri you can do something like this:
when HTTP_REQUEST { set uri [string tolower [HTTP::uri]] if { $uri starts_with "/test_cc/" } { pool Pool_KOR } else { drop } }If you want to reset the connection you can use reset instead of drop. If you want to reply with a html response you can use this instead of drop: HTTP::respond 401 Content "Access restricted."
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