redirect from MySite to http://intranet
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!
- Moved byMike Walsh MVPMVP, ModeratorFriday, October 30, 2009 4:46 AMMySite q (From:SharePoint - Development and Programming)
- Edited byMike Walsh MVPMVP, ModeratorFriday, October 30, 2009 4:45 AMall caps removed from MySite in Title.
All Replies
- 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. - 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. 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-usBlog 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.Thank You Chris.
Thank You Rajesh!, can you please paste a sample code.
- Thank You Balaji
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.


