Forum Discussion
Ranvir_Floura_7
Nimbostratus
Mar 02, 2007iRule to redirect to a different url and change port from 80 to 443
Hello folks,
I am looking to combine to things with a iRule. Basically what i want is if a user comes to http://www.abc.com gets redirected to https://www.xyz.com. This is what i have so f...
Wes_98712
Nimbostratus
Mar 02, 2007Do the same thing, here is an example of how I do it:
when HTTP_REQUEST {
set my_uri [HTTP::uri]
set my_host [HTTP::host]
set my_query [HTTP::query]
if { $my_host equals "www.abc.co" } {
HTTP::redirect "https://www.xyz.com$my_uri"
} else {
pool somepool
}
}Essentially all you need to do is use https in the redirect command.
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