sharepoint sites welcome page RRS feed

  • Question

  • i need to redirect the users to different url logging to the sites so please help me with the approach.

    I have more number of sites to be redirected ,if any automation available for this task.


    • Edited by sree_23 Monday, September 25, 2017 2:15 PM
    Monday, September 25, 2017 2:15 PM

All replies

  • Hi Blitz,

    As a workaround, you could write some JS code in the welcome page with SharePoint designer to get the current user. Then according the user information, you can redirect to the related URL.

    There is a demo below.

    <script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="/_layouts/15/sp.js"></script>
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
    var loginName;
    var id;
    var title;
    var email;
    var user;
    function onQuerySucceeded() {
        if(title=="System Account"){
    function onQueryFailed() {
        var context = SP.ClientContext.get_current();
        user = context.get_web().get_currentUser();    

    Notice put JS code in the tag of <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"></asp:Content > like picture below.

    There is another way. You could create a list and add users and related URLs in the list. Then loop in the list and redirect to the corresponding URL according to the current user by adding JS code in the welcome page.

    Best regards,

    Lee Liu

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    • Edited by Lee Liu Wednesday, September 27, 2017 1:41 AM
    • Proposed as answer by Dennis GuoModerator Thursday, September 28, 2017 9:00 AM
    Tuesday, September 26, 2017 10:28 AM