Forum Discussion

vishnu1994's avatar
Icon for Altostratus rankAltostratus
Sep 20, 2022

Need help with irule

Hi  I have an application and we need only certain URI to be accessable and if the user directly go to they need to get URL NOT ACCESSIBLE  and users only allowed to go to
  • Kevin_Stewart's avatar
    Sep 20, 2022

    A simple switch might look like this:

    when HTTP_REQUEST {
       switch -glob [string tolower [HTTP::uri]] {
          "/page1" -
          "/page2" { }
          default {
              HTTP::respond 400 content "URL NOT ACCESSIBLE" "Connection" "close"