Forum Discussion
ops_69313
Nov 10, 2010Nimbostratus
Redirect 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 redir...
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
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