Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to use an application page, residing in the _layouts folder, as the default Welcome page of SharePoint?

According to the WelcomePage property, only Site Pages can be used as the welcome page. A hack around would be to create a dummy ghostable Site Page, that basically redirects to the application page that I want to display as the welcome page. However, I wanted to avoid this, as I don't really need a Site Page for this particular scenario.

share|improve this question
add comment

marked as duplicate by Daniel Ziga, RJ Cuthbertson, Vardhaman Deshpande, PirateEric, Benny Skogberg Oct 16 '13 at 15:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

You can do that, here is an example:

Add-PsSnapin Microsoft.SharePoint.PowerShell
$assignment=Start-SPAssignment
$web=Get-SPWeb -Identity "http://testsite" -AssignmentCollection $assignment
$rootFolder=$web.RootFolder
$rootFolder.WelcomePage= "$rootFolder.ServerRelativeUrl _layouts/pages/yourpage.aspx"
$rootFolder.Update()
Stop-SPAssignment $assignment
$web.Update()
$web.Dispose()
Write-Host ‘Welcome Page Set Successfully…’
Write-Host ‘Press any key to exit…’
$x=$Host.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown”)
$Host.SetShouldExit(1)
share|improve this answer
    
Hi Falak, I've tried your suggestion, but it doesn't seem to change the WelcomePage from default.aspx to the new one, even though the WelcomePage of $rootFolder is set accordingly. –  João P. Silva Jun 20 '12 at 10:29
    
Also, I'm using a Blank Site, and I do not have the Publishing Feature active. Is it required? –  João P. Silva Jun 20 '12 at 10:46
add comment

I have solved this problem in the past by setting up a redirection.

Follow the instructions here to set up a redirect page. I had to use SharePoint Designer to put my redirect page in the root of the Site.

Or follow these instructions to set up an IIS URL Rewrite rule. In this case I set the Match URL regular expression pattern to ^$.

share|improve this answer
add comment

You cannot set Application pages as Welcome Page, only Site pages located either at the root web or from a Pages library.

Please refer to Possible to have the default landing page of my Sharepoint Site be an applicaiton page?

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.