문제

I installed Umbraco 4.5 and it is running fine. one thing i cant get to work though, is the 404. When it hit a page that does not excist it shows the default IIS7 404 page, and not the built-in umbraco 404 page.

So i am asuming it is a setting in the iis i have to change - but which?

도움이 되었습니까?

해결책

Copy from http://our.umbraco.org/forum/using/ui-questions/8244-IIS7--404:

Basically, you need to add

<location path="Site Description">
  <system.webServer>
    <httpErrors existingResponse="PassThrough" />
  </system.webServer>
</location>

to your applicationHost.config file where "Site Description" is the name of your site in IIS7.

The applicationHost.config file is located in: system32\inetsrv\config

Edit:

As stated in the comments if this answer, you should add this section in your web.config instead which is way better, you should always avoid altering config files outside your own application that may affect other applications.

다른 팁

in config/umbraco.settings you can set the umbraco page to load for custom 404

<errors>
  <!-- the id of the page that should be shown if the page is not found -->
  <!--        <errorPage culture="default">1</errorPage>-->
  <!--        <errorPage culture="en-US">200</errorPage>-->
  <error404>1296`</error404>`
</errors>

The page error page ID goes between the <error404> & </error404> tags.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top