Forum Discussion
https redirect except not for this client ip.
Another irule help please. I have this basic https redirect on a vip, it currently applies a redirect to all vip traffic. I need to modify so if a specific client IP comes in, there is no redirect applied, it should allow it thru on http. So in other words, if client is 55.66.77.88 process with http everyone else gets https redirect.
when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }
Correct the ! == not so if should read if the client ip not euqal 55.66.77.88 then do this. With out the ! it would only redirect on the IP match.
- Richard__HarlanHistoric F5 Account
The following should give you a idea on what to do.
when HTTP_REQUEST { if { ! [IP::addr [IP::client_addr] equals 55.66.77.88] } { HTTP::redirect "HTTPS://[HTTP::host][HTTP::uri]" } }
- Gill_32697Nimbostratus
I think its in reverse. Im looking for everyone to have https applied and redirected. Unless, if you are ip 55.66.77.88 then you don't get https redirect, you are allows to continue to the url/uri using http.
when HTTP_REQUEST { if { ! [IP::addr [IP::client_addr] equals 55.66.77.88] } { HTTP::redirect "HTTPS://[HTTP::host][HTTP::uri] } }
- Richard__HarlanHistoric F5 Account
Correct the ! == not so if should read if the client ip not euqal 55.66.77.88 then do this. With out the ! it would only redirect on the IP match.
Recent Discussions
Related Content
* 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