Organic
Organic

Reputation: 259

IIS7.5 web.config redirects being ignored

I have the following httpredirect in the web.config which is being ignored. This web.config is on the root of a hybrid webforms and MVC web application. Both locations in the example below are webforms pages.

<configuration>
<system.webServer>
    <httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Permanent">
      <add wildcard="*/foldername/" destination="/anotherfolder/file.aspx" />
    </httpRedirect>
  </system.webServer>
</configuration>

This is on localhost btw but the httpredirect should work on both the localhost and the live server. What am I doing wrong?

NOTE: There are a lot of instructions on the web pointing to the URL Rewrite IIS module. I can't install this on the live server so that's not an option.

Upvotes: 1

Views: 1460

Answers (1)

JamesKn
JamesKn

Reputation: 1045

https://www.iis.net/configreference/system.webserver/httpredirect

For anyone in the future. Check Modules are installed from above link.

Upvotes: 2

Related Questions