Forum Discussion
mfkk531_168091
Nimbostratus
11 years agoiRule for 403 redirect?
Hi All, I need help in refining this irule. when HTTP_REQUEST {
if { ([HTTP::uri] contains "/recommended") or
([HTTP::uri] contains "/activate") or
([HTTP::uri] contains ...
- 11 years ago
Hello M,
The below is pretty much a template, depending on how you want the value to match within the URI. I've included the link to the switch section of the iRules wiki, a very good resource. The way I'm utilizing the wildcard would make these match URI when they begin with the value.when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/recommended*" - "/activate*" - "/activated*" - "/userstatus*" - "/recbycat*" - "/targeted*" { HTTP::respond 403 content {403 Unauthorized}} } }
Robert_Luechte2
Cirrus
11 years agoWhat issues are you having with this iRule? What are you looking to refiine?
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