Forum Discussion
darrenclegg_199
Sep 09, 2011Nimbostratus
Access restriction to certain URLs
I have a simple iRule to only allow certain URLs access(see below)
when HTTP_REQUEST
{ if { not ([string tolower [HTTP::host]] eq "www.domain.com") }{
drop
HTTP::respond 20...
Michael_Yates
Sep 09, 2011Nimbostratus
The iRule that you have created is a literal compare, so the other domains should not be blocked by this iRule.
Did you need to just allow them through or did you need to route them to different server pools? If you just want to allow them through then you can use the iRule like you have it. If you need to route each different [HTTP::host] then you will need to make a few additions (I would suggest using a switch statement).
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