Friday, 28 January 2011

Change Sharepoint site home page to Sub-site page

Sharepoint 2010 has given top ribbon from where you can change any sharepoint page as home page for current site by "Make this page as Home page"


But there is one limitation, you cannot assign sub site pages as top site home page.

Then how could you do this change? Is there any way to change default home page to the sub-site pages? Even you cannot change default home page from IIS.

I googled for this and found another way to change default home page path. You have to change into web.config file of Sharepoint site(you can find web.config by looking at Local_Drive:\Inetpub\wwwroot\port_number or check this blog for more details http://blog-sharepoint.blogspot.com/2009/12/where-is-sharepoint-webconfig.html )

Edit your site web.config file with following lines (under system.web )

<urlMappings enabled="true">

<add url="~/" mappedUrl="/french/Pages/Default.aspx"/>

</urlMappings>



Save above changes to web.config file and reset IIS. And now browse for the site, you will see the changes.

you can change default home page in both Sharepoint 2010 and MOSS 2007.