Forum Discussion
bryan_p
Jun 30, 2022Nimbostratus
LTM iRule to redirect root domain to cname?
Doing some research and finding the inverse of this request. Is it possible to have an iRule to redirect traffic destined for the root domain to a cname value? Example- website.com -> www.website....
JRahm
Jun 30, 2022Admin
If my assumption is correct that you're looking for an HTTP redirect here, this would be most simply:
when HTTP_REQUEST {
if { [llength [split [HTTP::host] "."]] == 2 } {
HTTP::redirect https://www.[HTTP::host]
}
}
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