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...
Chris_Miller
Altostratus
Feb 10, 2011Sure.
You'd have a string type data group called something like "domainredirects." In that group, you'd have a string like "xxx.domaina.com" with a value like "xxx.domainb.com." Then, your rule would look something like this:
when HTTP_REQUEST {
if { [class match [HTTP::host] eq domainredirects] } {
HTTP::redirect "https://[class search - value domainredirects eq [HTTP::host]]" }
}
Otherwise, if your scheme is as simple as xxx.domaina.com > xxx.domainb.com, then a string command would be more efficient. All depends on how many characters you're changing I suppose.
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