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]] {
...
Nuruddin_Ahmed_
Cirrostratus
Jun 14, 2016i get below errors
01070151:3: Rule [/Common/Specific-URL-erp-qas] error: /Common/Specific-URL-erp-qas:1: error: [parse error:
missing close-brace: possible unbalanced brace in comment][{
switch -glob [string tolower [HTTP::path]] {
switch -glob [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 }
}
}]
/Common/Specific-URL-erp-qas:3: error: [command is not valid in the current scope][switch -glob [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 }
}]
/Common/Specific-URL-erp-qas:3: error: [command is not valid in the current scope][HTTP::path]
/Common/Specific-URL-erp-qas:9: error: [command is not valid in the current scope]
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