Forum Discussion
Ten_92952
Nimbostratus
Sep 03, 2010Redirect HTTP to HTTPS for some users
I have a need to redirect any external users that try to access a web site via HTTP to HTTPS.
I also need to allow internal users to access the exact same site via both HTTP AND HTTPS. ...
Chris_Miller
Altostratus
Sep 07, 2010I like to use data groups in situations like this. You can make an address-type data group that contains the subnets you don't want to redirect. If you're using 10.x, your iRule will look something like this:
when HTTP_REQUEST {
if { [TCP::local_port] eq 80 and ![class match [IP::client_addr] eq datagroup] } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
That's how I'd do it anyways
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
