Forum Discussion
ops_69313
Nimbostratus
Nov 10, 2010Redirect problems
I have a domain http://www.123.com that I need to redirect to http://www.abc.com but I need to not redirect any sub domain like http://zzz.123.com or any uri like http://www.123.com/um I need to redirect them to https. can anyone help with this?
2 Replies
- hoolio
Cirrostratus
Hi Ops,
If you only want to redirect www.123.com with a URI of / to www.abc.com and everything else to the same host and URI via HTTPS, you could use an iRule like this:when HTTP_REQUEST { Check for host/uri match if { "[HTTP::host][HTTP::uri]" eq "www.123.com/" }{ Send hardcoded redirect HTTP::redirect "http://www.abc.com/" } else { Redirect to same host/URI via https HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
Aaron - ops_69313
Nimbostratus
Thank you it works great!!
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