302 Redirect to Images in IE8 do not render image

Posted by empire29 on Stack Overflow See other posts from Stack Overflow or by empire29
Published on 2012-09-11T03:33:55Z Indexed on 2012/09/11 3:37 UTC
Read the original article Hit count: 247

I am helping migrate a legacy application. One of the requirements is we are able to handle requests for old images.

What we have is:

  • New site on new.com
  • Old site on old.com

Images to links (imported content) point to /imgs/cat.png however the actual image is hosted on old.com/assets/images/cat.png (for now).

<img src="/imgs/cat.png"/>

I setup a redirect for all png, jpg, jpeg, gif that 302's requests for new.com/imgs/(.*).(png|jpg|jpeg|gif) to http://old.com/assets/images/$1.$2

Everything works find in Chrome, Firefox and IE9 - however it was noted in IE8 the image does not render. Its possible that it has the same issue in IE7, 6 and 5.5 however I have not been able to test this.

Does anyone know why this is happening and how to fix?

I tried setting the contentType header on the response of the 302's to image/(png|jpg|jpeg|gif) and this did not have any impact.

Any insight would be appreciated.

© Stack Overflow or respective owner

Related posts about image

Related posts about internet-explorer