Reputation: 25
I have the following redirection requirement:
From URL: http://localsource.com/images/products/example.jpg
To URL:localsource.com/some-landing page
I have heard from some expert we need to update web.config file adding extensions like jpg, png, .air for resolving above kind of redirections requests. I am confused here, Can anyone help here please with the exact answer?
Upvotes: 2
Views: 70
Reputation: 27132
Install URL Rewrite and add code below to your web.config
file:
<rewrite>
<rules>
<rule name="Rewrite jpg">
<match url="^images/products/example.jpg" />
<action type="Rewrite" url="some-landing page" />
</rule>
</rules>
</rewrite>
For more information, check Creating Rewrite Rules for the URL Rewrite Module article.
Upvotes: 1