Forum Discussion
Yesh1923
Nimbostratus
Jan 17, 2023Multiple http_request iRules not working Same Virtual server
how to merge this 2 irule when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "energy.com") HTTP::respond 301 location "https://www.[HTTP::host][HTTP::uri]" Connection Close } } ...
Jan 17, 2023
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"energy.com" -
"goodenergy.com" -
"oddenergy.com" {
HTTP::respond 301 Location "https://www.[HTTP::host][HTTP::uri]" "Connection" "Close"
return
}
"corporate.ndtv.com" -
"marketing.ndtv.com" {
HTTP::respond 301 Location "https://www.ndtv.com" "Connection" "Close"
return
}
}
}
You can review the article at the link for switch command usage.
Yesh1923
Nimbostratus
Jan 17, 2023hi enes
i will test this rule will come back if faced any issue
thanks agian for your support !!!!!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects