Okay, so if you’re seeing some content, there’s a very good chance that you’re experiencing what I call “the proxy effect”. Basically, an HTTP request is generally a method (GET, POST), a URL path, and then a bunch of headers. An HTTP response is a status (200 OK), some headers, and then some payload. Inside that payload, and in some cases inside headers, URLs are either presented as relative (ex. /images/mycat.png) or absolute (ex. http://test.domain.com/images/mycat.png). Since you’re virtualizing the application with a proxy server, and in this case actually changing the scheme, there’s a very real possibility that the server isn’t aware of this and is presenting absolute URLs to the client that reflect what it thinks is the correct address. In other words, if it worked with HTTP but now fails partially with HTTPS, there’s a very good chance that the HTML content the client is receiving contains URL references to HTTP:// content, which are now not accessible. The VERY BEST way to troubleshoot this is to first understand what’s breaking. And to do that you need a client side capture utility like Fiddler or HTTPWatch to observe the HTTP traffic from the client’s perspective. If in the capture you see the browser try (and fail) to access an HTTP:// resource, it’s a fair bet that some previous response contained that bad URL. If you know where it’s coming from, you’ll be able to effectively fix it with an iRule.
Thanks Kevin.. It is working now..!!! I have used below irule to allow insecure content for http refereces and enabled stram profile in the VS.
when HTTP_REQUEST {
Save the requested host value
set host [string tolower [HTTP::host]]
If the HTTP host header is blank, use the VS IP address
If the VS IP is not routable for clients, hard code a routable IP
to replace [IP::local_addr]
if {$host eq ""}{set host [IP::local_addr]}
Disable the stream filter by default
STREAM::disable
}
when HTTP_RESPONSE {
Check if response type is text and host isn't null
if {[HTTP::header value Content-Type] contains "text" and $host ne ""}{
Replace http://$host with https://$host
STREAM::expression "@http://$host@https://$host@"
Enable the stream filter for this response only
STREAM::enable
}
Rewrite the Location header in redirects to https://
if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] starts_with "http://$host"} {
HTTP::header replace Location [string map -nocase "http://$host https://$host" [HTTP::header Location]]
}
}
I have used above irule for http to https issue but now facing a new problem. The application hosted behind sees the request url as http:// and it tries to respond back accordingly causing the problem.
I have captured TCPDUMP and found there is a field full request URI mentioning http://