Forum Discussion
Need help to whitelist URI's
Above iRule is correct, You can remove the statement which is creating issue.
If i will be at you place then can try negative scenario and short irule for fun. You can try to use URI_DB class to add and remove the URI.
when HTTP_REQUEST {
if { !([class match [IP::client_addr] equals internal_subnets]) && ([class match [HTTP::uri] starts_with URI_DB) } {
HTTP::redirect "http://app.com/sorry.html"
}
else {
pool app_80_pool
}
}Add the all uri in URI_DB
"/sorry.html"
"/foo/combined.js*"
"/foo/css/*"
"/foo/desktopreset"
Please tune iRule per requirements.
Thanks
I have reversed the logic back to the original but now using datagroup instead of the "switch -glob" meaning,
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals internal_subnets] || [class match [HTTP::uri] starts_with URI_DB] || [HTTP::host] equals "app.com"} {
pool app_80_pool
}
else {
HTTP::redirect "http://app.com/sorry.html"
}
}
Now, everything works except the redirect which never works. However, I have just noticed that if I don't use DNS and use IP instead, the redirect works just fine. Can you explain why?
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