开发者

404 page in Umbraco?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜