Hi cymru81,
iRule:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "site.abc.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/live" {
HTTP::uri "/live_site"
pool pool_live
}
"/test" {
HTTP::uri "/test_site"
pool pool_test
}
}
}
}
iRule with redirect:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "site.abc.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/live" {
HTTP::redirect "https://site.abc.com/live_site"
pool pool_live
}
"/test" {
HTTP::redirect "https://site.abc.com/test_site"
pool pool_test
}
}
}
}
If the HTTP::host is not site.abc.com, you can reject requests.