What testing have you performed, and what results are you getting vs what you expect?
I tried to pretty this up a bit as it was difficult to read from your OP. Does this look like what you have? (When you post one of these, use the 'pre-formatted code' button to make the code more readable.)
when HTTP_REQUEST {
log local0. "Path = [string tolower [HTTP::path]]"
log local0. "Client IP = [IP::client_addr]"
if { [string tolower [HTTP::path]] contains "MyHiddenLoginPage.aspx" } {
if { !([IP::addr [IP::client_addr] equals 10.0.0.8]) } {
discard
log local0. " Just discarded a request!"
} else {
log local0. "Just processed a request!"
}
}
}
One immediate issue I notice is your If-test. You use the 'string tolower' conversion to make the string all lower-case, but then you attempt to test against a mixed-case string. That will never match. Change your test text to all lower-case, or if you want a case-sensitive match remove the 'string tolower' operation.
When you move to production do you plan to use a data-group to hold your 'LAN user' IPs for the IP address match? That would be a good idea to allow flexibility and scalability for your matches. There are many DevCentral posts for using data-groups for matching, though you may already be familiar with the syntax.