Hi,
([whereis [IP::client_addr] country] equals "EG") or (![whereis [IP::client_addr] country ] equals "EG")
are the exact opposite.
You have to remove one of the condition. Because of possible subsequent requests, I suggest to change a little bit your irule. For example :
when HTTP_REQUEST {
set allowed 0
if { !([whereis [IP::client_addr] country ] equals "EG") } {
set allowed 1
}
if { ($allowed == 0) and ([HTTP::path] ends_with "/register") } {
HTTP::redirect "http://www.test.com/register"
} elseif { ($allowed == 1) and ([HTTP::path] ends_with "/register") } {
HTTP::redirect "http://www.test/login"
} else {
pool test
}
}