Forum Discussion
Vijay_E
Dec 20, 2016Cirrus
Looks good. May be use a variable:
when HTTP_REQUEST {
set PATH [string tolower [HTTP::path]]
Check if path starts with /my_old_site/
if { $PATH starts_with "/my_old_site" && $PATH not (starts_with "/my_old_site/subsite_we_need_to_keep")} {
Modify HTTP::path to replace original request
HTTP::redirect [string map {/my_old_site /my_new_site} [HTTP::path]]
}
}