client ssl

I have an https virtual server with a clientssl profile. When connecting to the virtual server the client gets a popup message “This page contains both secure and non secure items. Do you wish to display the non secure items?” Yes/No/Cancel

Instead of rewriting the web page to use relative links instead of explicit… how would I implement an iRule that changed every href from http to https? Any help is appreciated.

There are several ways you can modify the content of the response payload. One of the more optimal ways is to use the “regexp” command with the “-indices” option to return indices of all instances of a searched for string in the payload and then use the “HTTP::payload replace” command to replace those values with the new string.

Here’s a blog post that I did that covers a forum post on this topic:

Click here

BTW, now that I think about it you might want to keep track of the total lenght change on update the “Content-Length” HTTP Response header with the correct value.

-Joe

For some reason I thought that using the stream profile for this was considered more optimal than regex? (I am getting near the point where I want to implement a rule similar to this)..

Thanks,

Brian

Brandorr is correct. Using the STREAM module is better in many cases since it does not require buffering the entire response.

That’s what the http response rechunk profile option is for. Of course, it only works if chunking is enabled.