Forum Discussion
Cyril
Nimbostratus
Apr 26, 2016Query on redirection
Hello All,
I have the below URL redirection requirement and I'm not sure if this is possible or not.
https://abcd.maintenance.com needs to be redirected to https://www.maintenance.com
...
Theo_12742
Cirrus
Apr 26, 2016Certainly. You can access the HTTP::host and HTTP::uri variables and evaluate them separately.
I'd suggest using the Policy for readability, but the iRule would look like (untested):
when HTTP_REQUEST {
if { [HTTP::host] == "abcd.maintenance.com" and ([HTTP::uri] == "/" or [HTTP::uri] == "") } {
redirect "https://www.maintenance.com/"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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