Forum Discussion
Samir_Jha_52506
Noctilucent
If all the condition will be same like above, Then i will write simple iRule like below.
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { [string tolower [HTTP::host]] equals "my.oldsite.com" } {
HTTP::redirect "http://my.newsite.com$uri"
}
}
Tony2020
Apr 28, 2017Nimbostratus
forgot to mentioned. In your code, where is the section to pull in the data group that contains the list of URIs? We want to only match based on those URIs, so if there is a match, it will redirect. If there are no match with URIs, than it should not get redirected and should stay on "my.oldsite.com".
Thank you.