Chenco_322726
Nov 08, 2017Nimbostratus
Url redirect to a subdomain from sepcific URi to subdomain with the same URi
Hello,
We need to achieve this :
(or whatever url after the “mobile”) redirect/rewrite it to : mobile.newdomain.com/news.asp (or whatever url that was entered after the “mobile” in the first place).
Our irule looks like this currently:
when HTTP_REQUEST { if {([string tolower [HTTP::host]] eq "mobile.domain.com")} { HTTP::respond 301 Location "https://mobile.newdomain.com[HTTP::uri]"
} if {([string tolower [HTTP::uri]] contains "/mobile")} {HTTP::respond 301 Location ";} }
What happens it when going to : “” it redirects to “mobile.newdomain.com” as it should. But when entering “” it redirects to “mobile.newdomain.com/mobile/news.asp” Any help would be much appreciated! thank you!