Forum Discussion
William_Rodgers
Nimbostratus
Apr 18, 2007HTTP redirect
My system is running fine in production, but I need to do some parallel "testing" with the production system. During one of my transactions, I get a redirect to my browswer that sends me to https://www.domain.com
Because of the location of my client I cannot intercept the 302 redirect, but my load balancer is between my client and my server. Problem is that I cannot do HTTPS for my testing, so when the client goes to connect to the server through the load balancer for this transaction, I need to rewrite:
https://www.domain.com to http://www.domain.com
I am using the normal http::host and redirect commands in my IRULEs to redirect from HTTP to HTTPS, but how do I check to see if the request starts with HTTPS since HTTP::Host does not contain the http:// or https:// stuff???
1 Reply
- Unfortunately, the protocol (HTTP,HTTPS,etc) are not part of the HTTP spec. The only thing you have to go by is the local port (TCP::local_port).
The easiest way is to separate HTTP and HTTPS into two virtuals with the same IP and different ports (80 for HTTP and 443 for HTTPS). This way, you can assign iRules specific for HTTP and for HTTP to their respective virtuals. Also, keep in mind that if you need to inspect HTTPS content, you will need a clientssl profile for REQUESTs and/or serversll profile for RESPONSEs.
-Joe
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