次の方法で共有


Supported way of replacing application pages in layouts directory

In SharePoint 2010 the CustomPages dictionary allows you to replace AccessDenied, Confirmation, Error, Login, RequestAccess, Signout, or WebDeleted pages by supplying an alternative path to a different file in the layouts directory. 

You can access the CustomPages dictionary both through OM and through PS cmdlet. This would be the supported way of replacing these pages in layouts directory.

2 CmdLets that you might want to check it out

  • Get-SPCustomLayoutsPage (Will display the collection, you can selectively look at specific item by specifying parameter –Identity “AccessDenied | Confirmation | Error | Login | RequestAccess | Signout | WebDeleted
  • Set-SPCustomLayoutsPage

Following PS Command replaces Request Access Page (reqacc.aspx) in layouts folder, assuming customized version of Request Access page is deployed to custompages folder under layouts directory

Set-SPCustomLayoutsPage -Identity "RequestAccess" -Rela
ivePath "/_layouts/custompages/reqacc.aspx" -WebApplication "{replace with web app url}"

 

Technorati Tags: SP2010