Ask a questionAsk a question
 

Questionredirect from MySite to http://intranet

  • Thursday, October 29, 2009 8:08 PMsirii Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

    I have disabled my site feature by un-checking the “Create Personal Site" in SSP.

    But, now the users who all bookmarked or saved the link are able to access their MYSITES.

    I want them to redirect to http://intranet page instead of their MYSITES.

    When a user enter their MYSITE URL it should redirect them to http://intranet

    Please help; If possible please help me with a source code.

    Thanks!

All Replies

  • Thursday, October 29, 2009 8:12 PMChrisC_26 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Could you get your dns people to add in a redirect? Or install a custom redirector on the server?

    The way you have it set now, people won't be able to create new mysites, but people that already have them still can use them.
  • Thursday, October 29, 2009 8:15 PMRajesh.Sitaraman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You can write a HttpModule and achieve the redirection, put the HttpModule in the MySite web Application.
    Lot of reference are available in net, just bing for HttpModule.
    ---
    Rajesh | My Blog
    MCTS - WSS AD, WSS Config, MOSS Config.
  • Thursday, October 29, 2009 8:25 PMBalaji Baskar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    note that sharepoint runtime still forwards the request to the non-exists page when the user clicks MYSITE link that point to a user which has profile.

    These articles will definetly help you with the issue:

    How to point to a custom 404 error Web page in Windows SharePoint Services 3.0 or in Microsoft Office SharePoint Server 2007
    http://support.microsoft.com/kb/941329/en-us

    Blog Reference:
    How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
    http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx


    Balaji Baskar If it helps, mark it as Answers.
  • Thursday, October 29, 2009 9:36 PMsirii Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank You Chris.

  • Thursday, October 29, 2009 9:37 PMsirii Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank You Rajesh!, can you please paste  a sample code.

  • Thursday, October 29, 2009 9:38 PMsirii Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank You Balaji
  • Thursday, October 29, 2009 9:41 PMRajesh.Sitaraman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank You Rajesh!, can you please paste  a sample code.

    public class Rewrite : System.Web.IHttpModule
        {       
            public void Init(System.Web.HttpApplication Appl)
            {          
                Appl.BeginRequest += new System.EventHandler(Rewrite_BeginRequest);
            }

          
            public void Dispose()
            {
                //make sure you clean up after yourself
            }

         
            public void Rewrite_BeginRequest(object sender, System.EventArgs args)
            {
                System.Web.HttpApplication Appl = (System.Web.HttpApplication)sender;          
                string destURL = ConfigurationSettings.AppSettings["destURL"];   
                Appl.Response.Clear();
                Appl.Response.AddHeader("Location", destURL);
                Appl.Response.StatusCode = 302;                
              
            }       
        }

     

     

     

    Hope this helps
    ---
    Rajesh | My Blog
    MCTS - WSS AD, WSS Config, MOSS Config.