Forum Discussion
Dbow_21284
Nimbostratus
Apr 26, 2010Need to Redirect HTTPS Request to Another HTTPS Request
Hello,
I need to do the following:
Redirect https://www.whatever.com to https://www.suntin-else.com ... I cannot find an iRule to do this. It is easy to do the HTTP to HTTPS, b...
Michael_Yates
Nimbostratus
Oct 28, 2011You can detect the target domain with [HTTP::host] and the perform a redirect.
This is a 302 - Temporary Redirect. If you want a 301 - Permanent then you will need to change it to HTTP::respond 301 Locaton "https://www.website.com"
when HTTP_REQUEST {
if { [HTTP::host] eq "site1.com" } {
HTTP::redirect "https://mysite.com"
}
}
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