Forum Discussion
El-Guapo_29797
Feb 01, 2014Nimbostratus
*Redirect http to https for Internet clients but not private clients*
How to Redirect all clients from http to https for Internet clients but allow http to private client IP? Following is not working properly:
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_a...
Kevin_Stewart
Feb 03, 2014Employee
I concur. You can also save yourself the trouble of a variable assignment by putting everything in one event:
when HTTP_REQUEST {
log local0. "incoming IP: [IP::client_addr]"
if { ( [IP::addr [IP::client_addr] equals 10.0.0.0/8] ) or ( [IP::addr [IP::client_addr] equals 192.168.1.0/24] ) } {
log local0. "local address - allowing"
return
} else {
log local0. "remote address - redirecting"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
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