Forum Discussion
kalicut_48905
Nimbostratus
Feb 26, 2009iRules HTTPS drop request
Hi,
We placed an iRule to redirect any traffic other than that comes to URI /PUBLIC/* to go thru HTTPS.
when HTTP_REQUEST {
if { not ([HTTP::uri] starts_with "/PUBLIC") } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
Requests to anything other than /PUBLIC* are being forced thr HTTPS correctly. But the problem is, http requests to /PUBLIC/* are being dropped instead of being serviced normally.
Please let me know if there is anything that i'm missing here.
Thanks,
Ram
- hoolio
Cirrostratus
Hi Ram,when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: New HTTP request to [HTTP::host][HTTP::uri]" Check if requested path does not start with /PUBLIC if { not ([HTTP::path] starts_with "/PUBLIC") } { log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to https://[HTTP::host][HTTP::uri]" Redirect non-public requests to the same host/URI but via https HTTP::redirect "https://[HTTP::host][HTTP::uri]" } }
- kalicut_48905
Nimbostratus
Thank you Aaron. One of our F5 admins accidentally deleted the default.
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