Forum Discussion
Fluidetom_12222
Dec 21, 2016Cirrus
thanks for your reply. This is the final working version of my iRule
when HTTP_REQUEST {
set PATH [string tolower [HTTP::path]]
Check if path starts with /my_old_site/
if {($PATH starts_with "/my_old_site") and not ($PATH starts_with "/my_old_site/subsite_we_need_to_keep")} then {
Modify HTTP::path to replace original request with new address
HTTP::redirect [string map {my_old_site /my_new_site} [HTTP::path]]
}
}