when http_request
1 Topic2 http request rules merge to one - one referer the other set access only
Hi I have two rules that work individually. But when i try and combine get no luck and just redirects everything to the default location. The first rule is to only allow the uri path in the irule, otherwise redirect to Unathorized page. Second is to only allow the request if it comes via 3 set referers. It would be much appreciated if someone can please help combine both of these? 1st RULE when HTTP_REQUEST { set uri [string tolower [HTTP::uri]] switch -glob $uri { "/path1/path2/path3*" - "/path4/path2/path3*" - "/path1/path2/path5*" - "/path4/path2/path5*" { redirect to Pool pool POOL_Servers_to_access-80 } default { log local0. "Other access not allowed $uri” HTTP::redirect "http://www.notallowed.asp" } } } 2nd RULE when HTTP_REQUEST { switch -glob [string tolower [URI::host [HTTP::header "Referer"]]] { "goodlocation.com/*" - "anothergoodlocation.com/*" - "youcanalsologin.com/*" { } redirect_to_location_to_sign_in_first "" { HTTP::redirect "http://goodlocation.com" } Allow Request to go through... default { pool POOL_Servers_to_access-80 } } } Thanks in advance. cheers Brett364Views0likes4Comments