locked
Sharepoint subsite - redirection to a asp.net website in the same domain RRS feed

  • Question

  • Dear all,

    Can I forward the sharepoint 2010 subsite url to an asp.net web application - hosted in a same domain?

    is this possible?

    If possible - any inputs will be helpful.

    thanks

    Sathya

    Wednesday, May 27, 2015 2:00 AM

Answers

  • Hi sathya,

    For this issue, there are two ways to do it:

    1. Use JavaScript to do it. In the subsite home page, add some JavaScript code to goto another website.
    2. Use HTTP model to achieve it. You can use HTTP model to monitor the request, if the URL is the URL of subsite, goto another website.

    Best Regards,
    Wendy


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Victoria Xia Thursday, June 4, 2015 9:50 AM
    • Marked as answer by Victoria Xia Tuesday, June 9, 2015 1:23 AM
    Thursday, May 28, 2015 3:27 AM
  • You can using something like this via a content editor web part on the home page:

    <script>

    window.location.href=http://url.com;

    </script>

    Hope this helps.

    Dyung


    • Edited by Dyung Ngo Thursday, May 28, 2015 4:26 AM
    • Proposed as answer by Victoria Xia Thursday, June 4, 2015 9:50 AM
    • Marked as answer by Victoria Xia Tuesday, June 9, 2015 1:23 AM
    Thursday, May 28, 2015 4:24 AM
  • Hi,

    There is any way in which you can achieve this. You can modify the default.aspx page of the sharepoint 2010 subsite to get the url redirected to the asp.net webapplication. Following are the steps. Note: Please test this is Development environment before implementing in Production

    SharePoint subsite url example : http://mosssps/Team/default.aspx

    Open the default.aspx in notepad and delete all the contents of it

    Add the following code to it

    <%@ Page language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>

    <script>

    window.location.href = "http://contoso/Pages/Default.aspx";

    </script>

    Here, http://contoso/Pages/Default.aspx is the URL where we want it to redirect if browse to http://mosssps/Team/default.aspx

    Upload the Default.aspx and now when you browse to http://mosssps/Team/default.aspx it will redirect to http://contoso/Pages/Default.aspx

    Hope this helps :)

    • Proposed as answer by Victoria Xia Thursday, June 4, 2015 9:50 AM
    • Marked as answer by Victoria Xia Tuesday, June 9, 2015 1:23 AM
    Thursday, May 28, 2015 7:36 AM

All replies

  • Hi sathya,

    For this issue, there are two ways to do it:

    1. Use JavaScript to do it. In the subsite home page, add some JavaScript code to goto another website.
    2. Use HTTP model to achieve it. You can use HTTP model to monitor the request, if the URL is the URL of subsite, goto another website.

    Best Regards,
    Wendy


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Victoria Xia Thursday, June 4, 2015 9:50 AM
    • Marked as answer by Victoria Xia Tuesday, June 9, 2015 1:23 AM
    Thursday, May 28, 2015 3:27 AM
  • You can using something like this via a content editor web part on the home page:

    <script>

    window.location.href=http://url.com;

    </script>

    Hope this helps.

    Dyung


    • Edited by Dyung Ngo Thursday, May 28, 2015 4:26 AM
    • Proposed as answer by Victoria Xia Thursday, June 4, 2015 9:50 AM
    • Marked as answer by Victoria Xia Tuesday, June 9, 2015 1:23 AM
    Thursday, May 28, 2015 4:24 AM
  • Hi,

    There is any way in which you can achieve this. You can modify the default.aspx page of the sharepoint 2010 subsite to get the url redirected to the asp.net webapplication. Following are the steps. Note: Please test this is Development environment before implementing in Production

    SharePoint subsite url example : http://mosssps/Team/default.aspx

    Open the default.aspx in notepad and delete all the contents of it

    Add the following code to it

    <%@ Page language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>

    <script>

    window.location.href = "http://contoso/Pages/Default.aspx";

    </script>

    Here, http://contoso/Pages/Default.aspx is the URL where we want it to redirect if browse to http://mosssps/Team/default.aspx

    Upload the Default.aspx and now when you browse to http://mosssps/Team/default.aspx it will redirect to http://contoso/Pages/Default.aspx

    Hope this helps :)

    • Proposed as answer by Victoria Xia Thursday, June 4, 2015 9:50 AM
    • Marked as answer by Victoria Xia Tuesday, June 9, 2015 1:23 AM
    Thursday, May 28, 2015 7:36 AM
  • Many thanks for your inputs - I will try this in test environment and try it production environment.

    Cheers

    Sathya

    Thursday, May 28, 2015 8:46 AM