Forum Discussion
Brian_Kenworthy
Nimbostratus
Feb 10, 2011HTTP>HTTPS Redirect to different domain
Hi all, this should be pretty simple....hopefully.
I have a simple HTTP>HTTPS redirect in place for a domain --> HTTP::redirect "https://[HTTP::host][HTTP::uri]"
We have several su...
Feb 10, 2011
if you always know that you want to move domainA.com to domainB.com, you could do something more generic like this
when HTTP_REQUEST {
if { [HTTP::host] ends_with "domainA.com" } {
HTTP::redirect "https://[getfield [HTTP::host] "." 1].domainB.com[HTTP::uri]"
}
}
That would redirect all requests to XXX.domainA.com to XXX.domainB.com retaining the URIs.Of course, if you have more domains to match on, then the class lookup will likely be a better solution.
-Joe
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