Forum Discussion
jt_47643
Nimbostratus
Mar 04, 2008irule appears to be matching on more than expected
What we are trying to do:
We wish to block a portion of our web site from anyone not coming from a particular IP.
This is the code we thought would work:
if (client_addr != 172.20.49.100 and http_uri starts_with "/cn/")
{ redirect to "http://qa-rev-wlc.combinenet.com" }
else
{ use pool qa-rev-wlc }
What we think we are seeing blocked:
URIs like: /company/images/CN_Upper_Logo.png
possibly matching on the /CN portion of the URI.
We are running 4.5.14
Thanks for the help,
Jt
1 Reply
- hoolio
Cirrostratus
Hi,
Could the problem be that the client IP address isn't what you're expecting?
If you send a request for http://example.com/company/images/CN_Upper_Logo.png, do you get redirected? If so, I'd be surprised--I thought the starts_with operator did a string comparison and that it was case sensitive. If that's really happening, can you try escaping the forward slashes with backslashes?
if (client_addr != 172.20.49.100 and http_uri starts_with "\/cn\/")
Aaron
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
