Forum Discussion
Multiple http_request iRules not working Same Virtual server
or can we have two working irule ,one for http_request another irule for block external ips
I think use date-group list and 'IF' on irule.
I couldn't test it, but I checked that it was set up in the equipment.
refer below irule and datagroup list:
when HTTP_REQUEST {
if { [class match [HTTP::header values "True-Client-IP"] eq dg-client-ip] } {
HTTP::respond 400 content "site currently unavailable, Please try again later"
} elseif { [class match [HTTP::host] eq dg-domain] } {
HTTP::respond 301 Location "https://www.[HTTP::host][HTTP::uri]" "Connection" "Close"
return
}
}
- Yesh1923Jan 20, 2023Nimbostratus
i add below but its not working as expected , web page not loading
when HTTP_REQUEST {
if { [class match [HTTP::header values "True-Client-IP"] eq mo-client-ip] } {
HTTP::respond 400 content "site currently unavailable, Please try again later"
} elseif { [class match [HTTP::host] eq mo-domain] } {
HTTP::respond 301 Location "https://www.[HTTP::host][HTTP::uri]" "Connection" "Close"
return
}
}
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com