Forum Discussion
Hien_Truong
May 24, 2021Cirrus
Hi Enes;
i appreciate for your reply, i tried to change both # 301 or #302 in my irule, when typing www.ABC.com, it redirect to www.CDF.com (that's good) but when i type www.ABC.com/#about for example, it will redirect to www.CDF.com/#about. we want the rest of them go to home page www.CDF.com only (beside of /Content and /Programs). Any input i appreciate it.
Thanks
- SanjayPMay 25, 2021Nacreous
Considering your VIP is hosting many applications and this rule should only be applied for www.abc.com HOST. You can try the below iRule
when HTTP_REQUEST { set uri [string tolower [HTTP::uri]] switch -glob [string tolower [HTTP::host]] { "www.abc.com" { if {$uri starts_with "/content" or $uri starts_with "/programs" } { HTTP::respond 301 Location "https://www.cdf.com/legacy[HTTP::uri]" } else { HTTP::respond 301 Location "https://www.cdf.com" } } default { return } } }