Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Using URL Rewrite or http redirect for mapped file?

$
0
0

How can I use either http redirect or the url rewrite module to redirect requests like this:

<img title="Run Report" src="z:\tools\img\hello.png" onclick=runreport()>

The mapped drive has got to go, and I cannot edit this html file.

I would need it to point to my web.api application, where I have relocated the images. The error I see in chrome debugging tools is like this: 

Not allowed to load local resource: file:///Z:/tools/img/hello.png

I tried the following URL Rewrite rule:

<rule name="Redirect Images"><match url=".+/tools/img/(.+)$" /><action type="Redirect" url="/newimagelocation/img/{R:1}" /></rule>

But this doesn't seem to work. Although it appears to work just fine in the url rewrite regex tester with that path. I do have other rules that are working, so I know the web.config is at least configured properly.

Is it because that src is not a true URL request? Any suggestions?


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>