I am trying to redirect/redirect and pass all http-only (non-secure) image urls through a local https proxy hosted on my domain (using Url Rewrite in IIS 8.5). The source does not provide https so this is my only solution (as far as I know). Here is my code and its not working. Kindly help:
<rule name="assets redirection" stopProcessing="false">
<match url="^(.*)\.example-differnt-domain\.com" ignoreCase="false" />
<action type="Redirect" url="https://example.COM/p/?url={HTTP_HOST}/{R:0}"
appendQueryString="true" redirectType="Permanent" />
</rule>
It does not seem to be doing anything. Source images urls are in the following format
http://subdomain1.subdomain2.example-different-domain.com/xyz/abc/lmnop.jpg
There could be other image types too
I want to rewrite the url so that it looks like this:
https://example.COM/p/?url=http://subdomain1.subdomain2.example-different-domain.com/xyz/abc/lmnop.jpg
Unfortunately, my regex is not really good and i am wondering I am might be doing something wrong with the pattern matching.
Any help is appreciated in this regard.