Unable to load PNG fileRSS

1 reply

Last post Apr 18, 2018 09:39 AM by Yuk Ding

  • Unable to load PNG file

    Apr 18, 2018 05:32 AM|KimBracknell|LINK

    Hi there, We have an application inside our firewall that previously loaded a PNG file from outside the firewall and located on our HTTP site into an email. We have moved to SSL and all requests to HTTP addresses are redirected to equivalent HTTPS ones (using URL Rewrite). So now neither the old nor the new link will display the image in the (HTML) apps email.  Can a call to load OIC_Web.png be handled thru URL Rewrite so that it loads correctly?

    Thanks,

    Kim.

          mmoBody.Text := mmoBody.Text + '<img src="http://www.oic.wa.gov.au/Portals/0/OIC_Web.png" width="443" height="94">';                           //Old http call worked but doesn't now

          mmoBody.Text := mmoBody.Text + '<img src="https://www.oic.wa.gov.au/Portals/0/OIC_Web.png" width="443" height="94">';                         //New https call doesn’t work

  • Re: Unable to load PNG file

    Apr 18, 2018 09:39 AM|Yuk Ding|LINK

    Hi KimBrackell,

    Not sure if this work for your application. URL rewrite rule could only rewrite the response html content body. So if what you want is rewrite the src link from the body you can see in fiddler. Then you could try this rule:

     <outboundRules>
                    <rule name="outbound rule" preCondition="Content_type">
                        <match filterByTags="Img" pattern="^http://www.oic.wa.gov.au/Portals/0/OIC_Web.png$" />
                        <action type="Rewrite" value="https://www.oic.wa.gov.au/Portals/0/OIC_Web.png" />
                    </rule>
                    <preConditions>
                        <preCondition name="Content_type">
                            <add input="{RESPONSE_CONTENT_TYPE}" pattern="text\html" />
                        </preCondition>
                    </preConditions>
                </outboundRules>

    If you can't see the src from response content body, then the outbound rule may not work.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.