Forum Discussion
tsm_329805
Nimbostratus
Aug 08, 2017Irule redirection from old URL (abc.com) to new URL (xyz.com)
All,
Looking for irule to redirect when user hits abc.com that should redirect to xyz.com.
Note: xyz.com is just a CNAME for abc.com.
looking forward for your help.
Thanks,
TS
Yann_Desmarest
Cirrus
Aug 08, 2017Hi,
You can use the following irule :
when HTTP_REQUEST {
if { [HTTP::host] eq "abc.com" } {
HTTP::respond 302 noserver Location "http://xyz.com" Connection Close
alternative : HTTP::redirect "http://xyz.com"
}
}
Or you may prefer to use an LTM policy for that.
Yann
tsm_329805
Nimbostratus
Aug 08, 2017Thanks for quick reply.
Sorry about my ask, forgot to mention that the requirement is for https. will this below still valid.? //
when HTTP_REQUEST { if { [HTTP::host] eq "abc.com" } { HTTP::redirect "; } }
//
Thanks, TS
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