Forum Discussion
birchy
Feb 19, 2020Nimbostratus
Redirect a subdomain to a sub directory of the root domain
Hey all,
i have been asked to redirect a sub domain to a sub directory of the root domain - any pointers on what type of IRule to use?
for instance we want to redirect xxxx.aaaa.com to aaaa.com/zzzzz
Thanks!
Following should do what you are asking for::
when HTTP_REQUEST { if { [HTTP::host] contains "xxxx.aaaa.com"} { HTTP::redirect "http://aaaa.com/zzzzz" } }
- NAGCirrostratus
Following should do what you are asking for::
when HTTP_REQUEST { if { [HTTP::host] contains "xxxx.aaaa.com"} { HTTP::redirect "http://aaaa.com/zzzzz" } }
Hi birchy,
See what you can do with the HTTP::redirect
Regards
try this. Hope it will work for you.
when HTTP_REQUEST { if { [HTTP::host] eq "xxxx.aaaa.com"} { HTTP::redirect "http://aaaa.com/zzzzz" } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects