Forum Discussion
Michael_A__Fied
Nimbostratus
May 21, 2010iRule using URI classes to restrict access
(version 9.4.7)
I have been restricting access to certain pools via the following iRule statement:
if { [matchclass [IP::client_addr] equals $::TrustedIPs] and [matchclass [HTTP::path] starts_wit...
Michael_A__Fied
Nimbostratus
May 24, 2010Posted By Michael Yates on 05/21/2010 03:04 PM
The [HTTP::path] starts at the first "/" so you will either have to account for it in your matchclass or add to your iRule to look for it and remove it.
HTTP::uri [string map {"//" "/"} [HTTP::uri]]
Wiki Entry for [HTTP::path] - http://devcentral.f5.com/wiki/default.aspx/iRules/http__path.html Awesome, thanks, I'll test that later. Is there any major advantage to performing the string map replace on the HTTP::uri vs the HTTP:path? We use extensive URIs and probably don't need to evaluate all the params in them.
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
