Forum Discussion
http to https redirection for selected IPs
I am using following irule to direct internal requests to port 80 and external requests to port 443, private_IP datagroup contains the IP which are required to go to port 80, all else should be redirected to https. As a result external http requests are redirecting to https, but internally when I try VIP then it forwards to port 80, and if I use URL then it takes me to https, where as requirement is that URL requests from inside should go to 80, added the FW PAT IP in data group but still URL from inside is redirecting to https.
when HTTP_REQUEST {
Check if client IP is in the datagroup
if {[matchclass [IP::client_addr] equals $::private_IP]}{
pool xyz
} else {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
Thanks
- hooleylistCirrostratusHi Varun,
- varun_malikNimbostratusHi Aaron
- Kevin_StewartEmployeeVarun,
log local0. "requesting [HTTP::host] from [IP::client_addr]"
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