Forum Discussion
Gorkalrp_105155
Nimbostratus
Jun 18, 2015Need help: iRules to allow only URIs
I would appreciate if some one could help me in create iRule/datagroup and applying iRule to allow only few URI's and remaining all should go to invalid page.
https://Ind-hyd.vidya.com/KURservle...
Stanislas_Piro2
Cumulonimbus
Jun 19, 2015The previous irule must generate cyclic redirect as the else statement redirect to the same URL.
the following irule must answer the need:
when HTTP_REQUEST {
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 }
}
}
The commented line is if you need to ignore the case. if you use this line, all conditions must be changed to lowercase.
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