Forum Discussion
Greg_Harris_111
Nimbostratus
Feb 02, 2006Redirect to HTTPS with no HTTP site
I see in the forums that redirect has been covered a lot. But here is my issue: can I force a client coming in to BIG-IP with http://www.domain.com to https://www.domain.com without have an http vip l...
unRuleY_95363
Feb 02, 2006Historic F5 Account
You could make a wildcard virtual on port 80 and have the iRule generically redirect to the same virtual on https:
virtual generic_http {
destination 0.0.0.0:80
mask 0.0.0.0
ip protocol tcp
profile tcp http
rule generic_redirect
}
rule generic_redirect {
when HTTP_REQUEST {
if { [HTTP::header exists host] }
HTTP::redirect https://[HTTP::host][HTTP::uri]
} else {
HTTP::redirect https://[IP::local_addr][HTTP::uri]
}
}
}This would allow you to only make the one virtual and rule that generically redirects all http traffic to your https virtuals.
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