环境:SharePoint 2010
网站Windows Authentication
做法:
1) Create a copy of SignOut.aspx in the Layouts folder. Rename it as CustomSignOut.aspx
2) Open the custom page in notepad\designer. In the function _spBodyOnLoad() replace windows.close() with windows.location("YourHomePageRelativeUrl");
3) Make this page the default sign out page for the web application using below command in SP Management shell :
Set-SPCustomLayoutsPage -identity "Signout" -RelativePath "/_layouts/CustomSignOut.aspx" -WebApplication
Note:
1. 你可以用在Powershell中输入set-spcustomlayoutspage -identity -? 来查看帮助
2. 我试了SignOut, Login,但只有SignOut是成功改变的,其他的都Login虽然设置成功了,但没有效果,可以只支持FBA的吧,不支持Windows Authentication
3. 可以通过以下命令查看是否成功设置:
get-spcustomlayoutspages
输进后回车回,需根据提示输入网站地址‘
参考以下网址:
http://sharepoint.stackexchange.com/questions/33167/sharepoint-2010-fba-redirect-on-sign-out