Forum Discussion
xiangyang_zhang
Nimbostratus
Mar 13, 2006Add "http://" in HTTP response
Hello, all
In some HTTP requests, protocol identifier 'http://' is not added. We would like to add "http://" in URL if it doesn't exist. I wrote two iRules for this purpose, neither of them ...
xiangyang_zhang
Nimbostratus
Mar 14, 2006It works perfectly. Thanks for help.
One more issue. Because in our solution, over 95% of request are HTTP request, the rest of 5% are secure HTTP ( https) request. I think that alteernative 1 is more efficient than alternative 2. What is your opinion ?
Alternative 1:
if { not ([HTTP::uri] starts_with "http://") } {
if { not ([HTTP::uri] starts_with "https://") } {
HTTP::uri "http://[HTTP::uri]"
}
}
Alternative 2:
if { (not ([HTTP::uri] starts_with "http://")) and (not ([HTTP::uri] starts_with "https://"))} {
HTTP::uri "http://[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