Forum Discussion
NicCage
Dec 06, 2017Nimbostratus
The content of the iRules is perfect. I just formatted the iRule a bit and added a missing closing bracked.
See the formated output below:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"some.example.com" {
if { [HTTP::uri] starts_with "/content"}{
set uri [HTTP::uri [string map {"/content" ""} [HTTP::uri]]]
HTTP::respond 301 Location "https://another.example.com$uri"
}
}
default {HTTP::respond 301 Location "https://another.example.com[HTTP::uri]"}
}
}