Sitepages redirects to default.aspx

​Its because the Home.aspx (may be another page in your case) is set as a welcome page for the library root folder. Below should fix it

$web = Get-SPWeb "http://site"
$list = $web.Lists["Site Pages"]
$rootfolder = $list.RootFolder
$rootfolder.WelcomePage = "Forms/AllPages.aspx"
Write-Host $list.RootFolder.WelcomePage

Add comment

  Country flag

  • Comment
  • Preview

About the author

Hi! I'm Marcell Mikolcsó, SharePoint and Enterprise Administrator, System Architect.

Month List

Page List