Forum Discussion
Nuruddin_Ahmed_
Cirrostratus
Jun 14, 2016irule to allow specific url
Hi,
I am trying to allow only specific path of an URI and got this code from devcentral but its giving lot of errors
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
...
Yann_Desmarest
Cirrus
Jun 14, 2016Hi,
Find below the code to have lower case. Notice that you need to set every path to lower case under the switch condition :
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/kurservlet/servlet/kurservlet" -
"/kurservlet-stage/servlet/kurservlet" -
"/kurservlet-test/servlet/kurservlet*" {}
default {
HTTP::redirect noserver "https://Ind-hyd.vidya.com/error/invalid.html
}
}
}
}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