Forum Discussion

Sean_Phillips_1's avatar
Sean_Phillips_1
Icon for Nimbostratus rankNimbostratus
Jul 12, 2013

ACL Block by path irule?!?!

I want to reject everything except the 3 listed html files with an irule. Am I right? Will this rule work?

 

 

 

when HTTP_REQUEST {

 

switch -glob [string tolower [HTTP::uri]] {

 

"/default.html" -

 

"/sales.html" -

 

"/support.html" { return }

 

default { reject }

 

}

 

}

 

1 Reply

  • you can add asterisk (*) if they are not under root (/).

    e.g.

    when HTTP_REQUEST {
        switch -glob [string tolower [HTTP::uri]] {
            "*default.html" -
            "*sales.html" -
            "*support.html" { return }
            default { reject }
        }
    }