404页的一把umbraco?
-
26-09-2019 - |
题
我安装一把umbraco 4.5,它是运行良好。有一件事我不能得到工作,虽然,是404。当它击中一个网页,不excist它显示了默认IIS7 404页,而不是内置的一把umbraco 404页。
让我asuming这是一个设置在IIS我要改变 - 但
解决方案
复制从 HTTP://our.umbraco。组织/论坛/使用/ UI-问题/ 8244-IIS7--404 :
基本上,需要添加
<location path="Site Description">
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>
</location>
你的applicationHost.config文件,其中“网站描述”是您的网站在IIS7的名称。
ApplicationHost.config文件位于:SYSTEM32 \ INETSRV \配置
修改强>
正如评论指出,如果这个答案,你应该在你的web.config加上这一部分,而不是哪个是更好的方式,你应该总是避免自己的应用程序之外改变配置文件,可能会影响其他应用程序。
其他提示
在配置/ umbraco.settings可以将一把umbraco页面设置为负载定制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>
在页面错误页ID所对应的<error404>
&</error404>
标记之间。
不隶属于 StackOverflow