Link to home
Start Free TrialLog in
Avatar of Rovi31
Rovi31Flag for Netherlands

asked on

IIS7 URL rewrite map to other external domain

I have a website in which the map "/img" must be redirected to another domain. The other domain can be an external one.

so "" must be redirected to ""

i also have a <base href="">, so the URL to be redirected will be most of the time "img/test/demo.jpg ", which then also should be redirected to to ""

i currently have this, but it doesn't work

     <rule name="Change image linking" stopProcessing="false">  
        <match url=".*\.(gif|jpg|png)$" />  
             <add input="{HTTP_HOST}" pattern="img/(.*)$" />  
      <action type="Redirect" url="{C:1}" appendQueryString="false" redirectType="Permanent" />  

Open in new window

How can i do that (in the web.config)

Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial