Is there any way to filter certain things in pages served by IIS?

Posted by Ruslan on Stack Overflow See other posts from Stack Overflow or by Ruslan
Published on 2010-03-19T02:44:29Z Indexed on 2010/03/19 2:51 UTC
Read the original article Hit count: 264

Filed under:
|
|
|
|

Hello,

This is my first time posting here so please keep that in mind...

I'll try to be short and get right to defining the problem. We have an ASP.NET 2 application (eCommerce package) running on IIS (Windows Server 2003). The main site's page(s) are using plain HTTP (no SSL), but the whole checkout process and the shopping cart page is using SSL (HTTPS). Now, the problem is that the site's header is located in a template file, and inside it it has a plain HTML 'img' tag calling an image with the "http://" portion hard-coded into it... This header appears on absolutely every page (including the https pages), and due to its insecure image tag, a warning box pops up in IE on every stage of the checkout process...

Now, the problem: The live application cannot be touched in any way (no changes can be made to the template (so simply changing "http://" to "//" is not an option), IIS cannot be restarted, and the website/app pool cannot be restarted). Is there any way in the world (maybe plugin for IIS or a setting somewhere) that I can filter the pages right before they are served to replace the '<img src="http://example.com/image.jpg">' with '<img src="//example.com/image.jpg">' in the final HTML? Possibly via a regular expression or something?

Thanks to everybody in advance.

© Stack Overflow or respective owner

Related posts about web

Related posts about iis