English 中文(简体)
将用户从旧的网络转向共享点
原标题:Redirecting user from an old web to another in Sharepoint

我要补充一下,当用户访问某些旧网站时,他们能够转播。 旧网站的URL不为人所知,但服务器名称相同,例如。

旧址:

http://sharepoint/mySite/default.aspx

新址:

http://sharepoint/myNewSite/...

在我的Site中还有其他许多网页,其中多数必须改用新网站,但有一些例外(例如,用户仍然可以在网站上查阅文件)。 我认为,我必须从一些方面从方案上来做这项工作,以掌握“http://www.un.org”的要求,并阅读“url”本人。 由于没有共同点 g,我有了一个快速的视角,发现撰写网站是我局势的最佳选择。

但是,鉴于我的情况和需要,我只想写一个网络部分,或者在方案上说什么是理想的解决办法? 或者,实现我想要使用“分享点”的更快捷的方法?

感谢。

问题回答

您可实施<代码>System.Web.IHttpModule,倾听System.Web.HttpApplication。 BeginRequest activity,检测到该请求书是否向旧网站提出,并在必要时将其重新定位到新网站。

这部分内容涉及创建<条码>Microsoft.SharePoint.Administration.SPWebConfigModification,在网上增加提及你的模块。 每个网络前线的简编。 如果你作为网络应用层面的特点加以实施,专题接收器启动方法的代码就可考虑这样的内容:

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
    var webApplication = (SPWebApplication)properties.Feature.Parent;
    var redirectionModuleType = typeof(MyRedirectionModule);
    var modification = new SPWebConfigModification()
    {
        Name = "add[@name= MyRedirectionModule ]",
        Path = "configuration/system.web/httpModules",
        Owner = "MyModule",
        Sequence = 0,
        Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode,
        Value = "<add name="MyRedirectionModule" type="" + redirectionModuleType.FullName + ", " + redirectionModuleType.Assembly.FullName + "" />"
    };
    webApplication.WebConfigModifications.Add(modification);
    webApplication.Farm.Services.GetValue<SPWebService>().ApplyWebConfigModifications();
    webApplication.Update();
}

你们可以通过三种方式做到这一点。

  1. creating a custom HTTP Module (Good solution)
  2. Write a javascript code in your old site s master page to redirect to new page (location.href) (easy to create but navigation happens from client side)
  3. Write a webpart with a code for redirection and deploy in old site s master page (easier than point1 )

你们可以认为,不要修改主页,而是自动将一些贾瓦文逻辑带入处理改头的现场收集的每一页。

查阅our free Share Point Infuser tool

如果你使用装载平衡器或反面代理,如ISA 服务器可以实施这些层次的再定向规则。





相关问题
SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

UI automated testing within SharePoint

I m looking for automated Functional Testing tools that can manipulate SharePoint sites, libraries, and documents thought the web interface. It needs to be extensible enough to handle any custom ...

Enable authorization on sitemap provider

I want to enable Authorization on the Site map provider. We have enabled anonymous access to the site and we want the Site map provider to be visible only to authorized users. I tried ...

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

Sharepoint 2007 Data view Webpart custom parameters

I m sort of new to the custom parameters that can be setup on a DataView Webpart. There are 6 options: - None - Control - Cookie - Form - QueryString - Server Variable I think that None, Cookie and ...

热门标签