April 28, 2011

Infinite loop when using sitecore and the iis url rewriting

Recently I have install the ULRewrite module for IIS7 : http://www.iis.net/download/URLRewrite

Everything was good but during my tests with IE7 I had a strange comportment: I have an infinite loop on the error page.

In fact, it was a mistake during the configuration of this module. Effectively, this module add this section in the web.config.
  <remove statusCode="404" subStatusCode="-1" />
  <error statusCode="404" prefixLanguageFilePath="" path="/notfound" responseMode="ExecuteURL" />
But the error page I have configured as the ItemNotFoundUrl is error-page-not-found.aspx:
<setting name="ItemNotFoundUrl" value="/sitecore/service/error-page-not-found.aspx" />
So we only need to put this url of our custom error page in path="XXX” or simply remove the section <httpErrors>

No comments:

Post a Comment