我安装了Umbraco 4.5,它运行良好。但有一件事我不能去做,那就是404。当它访问一个没有激活的页面时,它会显示默认的IIS7 404页面,而不是内置的umbro404页面。
所以我断言这是我必须改变的iis中的一个设置--但是是哪一个呢?
发布于 2010-09-01 13:43:27
从http://our.umbraco.org/forum/using/ui-questions/8244-IIS7--404复制
基本上,您需要添加
<location path="Site Description">
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>
</location>添加到您的applicationHost.config文件,其中“站点描述”是您在IIS7中站点的名称。
applicationHost.config文件位于: system32\inetsrv\config
编辑:
正如注释if this答案中所述,您应该在web.config中添加此部分,这样更好,您应该始终避免在您自己的应用程序之外更改配置文件,这可能会影响其他应用程序。
发布于 2010-09-09 11:23:54
在config/umbraco.settings中,您可以为自定义404设置要加载的umbraco页面
<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>页面错误页面ID位于<error404>和</error404>标记之间。
https://stackoverflow.com/questions/3613013
复制相似问题