SharePoint 404 页面 [英] SharePoint 404 page

查看:46
本文介绍了SharePoint 404 页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最好的地方是在 web.config customError 部分中为 SharePoint 设置 404 错误页面,还是网站集/网络应用程序上有配置设置?

Is the best place set the 404 error page for SharePoint within the web.config customError section or is there a configuration setting on the site collection/ web application?

推荐答案

请阅读 这个博客

粘贴:

  1. 在您的 MOSS 服务器中,复制%systemdrive%\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\sps404.html并将其命名为 my404.html

  1. In your MOSS server, make a copy of %systemdrive%\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\sps404.html and call it my404.html

在 IIS 中的 MOSS 根 Web 应用程序下创建一个虚拟目录.例如/errors

Create a Virtual Directory in IIS under your MOSS root web application. For example /errors

创建一个控制台应用程序并插入以下代码并在MOSS服务器中运行

Create a Console Application and insert the following code and run it in MOSS server

System.Uri webApplicationUri = new Uri(http://MyMOSSServer/);SPWebApplication webApplication = SPWebApplication.Lookup(webApplicationUri);webApplication.FileNotFoundPage = "my404.html";webApplication.Update();

System.Uri webApplicationUri = new Uri(http://MyMOSSServer/); SPWebApplication webApplication = SPWebApplication.Lookup(webApplicationUri); webApplication.FileNotFoundPage = "my404.html"; webApplication.Update();

现在,当您浏览一个不存在的页面时,您应该会被带到重定向的页面.

Now when you browse to a page that doesn't exist, you should expect to be brought to the redirected page.

这篇关于SharePoint 404 页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆