Forum Discussion
m00t
Apr 14, 2020Altostratus
iRule for domain host replacement
Hey all, I've been racking my brain trying to get a domain host replacement for a wildcard domain. Trying to do anything: *.domain1.com to redirect to *.domain2.com with the URI. C...
Mayur_Sutare
Apr 16, 2020MVP
Hello,
Please try below iRule,
when HTTP_REQUEST {
if { [HTTP::host] equals "domain1.com"} {
HTTP::redirect "https://domain2.com[HTTP::uri]"
}
}
Also you can even try to achieve this using policy.
Hope it works !
Mayur
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