Pau*_*art 3 redirect umbraco http-status-code-404
嘿伙计们正在使用Umbraco 4.7和我的服务器是IIS7想知道什么是不适合我.我基本上想要制作一个自定义错误页面(404),我尝试的一切都不起作用,检查论坛,但它仍然显示相同的问题.
我编辑了我的umbracoSettings.config
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<!-- <errorPage culture="default">1647</errorPage> -->
<!-- <errorPage culture="en-US">1647</errorPage> -->
<error404>1647</error404>
</errors>
Run Code Online (Sandbox Code Playgroud)
此外,我已经考虑过将此添加到web.config文件中.
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error.aspx" responseMode="ExecuteURL" />
</httpErrors>
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感谢.我是IIS的完整新手和涉及网络设置的任何事情.
谢谢保罗
小智 17
确保1647是404页面的节点ID.
还要system.webServer在web.config 中的标记中添加以下代码.
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="400" path="/404" responseMode="ExecuteURL" />
<error statusCode="404" path="/404" responseMode="ExecuteURL" />
</httpErrors>
Run Code Online (Sandbox Code Playgroud)
希望这有效......
以防万一有人像研究Umbraco 7的类似问题时那样偶然发现此问题,将config / umbracoSettings.config文件中的trySkipIisCustomErrors值设置为true对我有用。
<web.routing
trySkipIisCustomErrors="true"
internalRedirectPreservesTemplate="false">
</web.routing>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7108 次 |
| 最近记录: |