Forum Discussion
acgutierrez_123
Nimbostratus
Sep 12, 2013iRule to deny traffic from local network AND redirect to HTTPS
Hi all, I have this iRule that's currently working to only allow traffic from a network segment if the http request contains a certain uri, I also want it to be redirected from http to HTTPS but I'm ...
Colin_Walker_12
Sep 12, 2013Historic F5 Account
How about something like:
when HTTP_REQUEST {
if { ([HTTP::uri] contains "inscripcion-web") and ([IP::addr [IP::client_addr] equals 192.168.147.0/24]) } {
if {[TCP::local_port] == "443"} {
pool pool_.93y.94_8690_inscripcion-web
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
Something like that should get what you're looking for, I believe.
Colin
acgutierrez_123
Nimbostratus
Sep 12, 2013ok, but the inicial request is HTTP, what I want is when the user types http://www.example.com/inscripon-web/ it redirects to https, is that possible with that iRule?
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