ILovePaperTowels
ILovePaperTowels

Reputation: 1455

intercepting url rewrite module, prevent rewrite

Is there anything that would cause the url rewrite module in IIS to not fire off? Maybe a site that is in integrated mode or an http handler?

I have tried a few different things to get the rewrite rules to work but nothing. My latest is as such

<rewrite>
      <rewriteMaps>

      </rewriteMaps>
      <rules>
        <rule name="rewriterule" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
          <match url="*" />

          <action type="Redirect" url="http://www.google.com" />
        </rule>
      </rules>
    </rewrite>

and it doesn't work at all. I've tried various regex, etc. Its like it doesnt get used.

Upvotes: 0

Views: 324

Answers (2)

ILovePaperTowels
ILovePaperTowels

Reputation: 1455

The answer in my case is that you have to be running the site in the same target platform as the url rewrite module. for example, I have x64 version of url rewrite module installed but the site was running under 32bit. Once I setup the site to run under 64bit, the rewrite started working.

Upvotes: 1

tugberk
tugberk

Reputation: 58484

Seems like you have your answer but here are some other possible things that might cause Rewrite Module not to work :

  • When you deploy your web site and see this feature not working on your server, it is highly possible that you misconfigured something on your server. One of the misconfiguration you might have done could be setting the overrideModeDefault attribute to Deny for rules under <sectionGroup name="rewrite"> inside your applicationHost.config file.

  • If you are on a shared hosting environment and you see this feature not working, then ask your provider if they have given you the permission of configuring this part.

  • In your development environment, if you run your web site under Visual Studio Development Sever, you won’t be able to see this feature working. You need to configure your application to run under at least IIS Express to see this feature working.

Upvotes: 1

Related Questions