locked
RD Web Access URL redirection RRS feed

  • Question

  • I am having almost the exact same problem as the following thread : http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2rds/thread/704a2e10-0082-4f7d-8ae5-95d9ef37a5b2/.  The main difference between the article above and my situation is that we aren't using ISA.  Pretty much if you go to  mysite.mycompany.com/rdweb it will redirect you correctly to https://mysite.mycompany/rdweb.  I would like it so that when an end user types mysite.mycompany.com it will redirect them to https://mysite.mycompany/rdweb.  A url rewrite causes RDS to fail and the above article was never answered.  Any help would be great.
    Tuesday, July 31, 2012 4:45 PM

Answers

  • Hi,

    In IIS Manager on your RDWeb server, please select Default Web Site in the left pane.  In the middle pane double-click HTTP Redirect.  Select Redirect requests to this destination and enter the following:

    https://mysite.mycompany.com/rdweb

    Select Only redirect requests to content in this directory (not subdirectories)

    Set Status Code to Permanent (301)

    After making the above change please test that you are seeing the desired behavior.

    An alternative solution to the above would be to create a default.aspx file at the Default Web Site root (c:\inetpub\wwwroot) and perform the redirect that way.  In this case you would need to move default.aspx up to the top of the list of the default documents for the Default Web Site in IIS Manager.  Here is a sample default.aspx file that would perform the redirect:

    <%@ Page Language="VB" EnableSessionState="False" EnableViewState="False" Trace="False" Debug="False" Strict="True" %> 
    <script language="vb" runat="server">
      Sub Page_Load(sender as Object, e as EventArgs)
    		Response.Status = "301 Moved Permanently"
    		Response.AddHeader("Location", "https://mysite.mycompany.com/rdweb")
      End Sub
    </script>

    Thanks.

    -TP

    Tuesday, July 31, 2012 5:44 PM

All replies

  • Hi,

    In IIS Manager on your RDWeb server, please select Default Web Site in the left pane.  In the middle pane double-click HTTP Redirect.  Select Redirect requests to this destination and enter the following:

    https://mysite.mycompany.com/rdweb

    Select Only redirect requests to content in this directory (not subdirectories)

    Set Status Code to Permanent (301)

    After making the above change please test that you are seeing the desired behavior.

    An alternative solution to the above would be to create a default.aspx file at the Default Web Site root (c:\inetpub\wwwroot) and perform the redirect that way.  In this case you would need to move default.aspx up to the top of the list of the default documents for the Default Web Site in IIS Manager.  Here is a sample default.aspx file that would perform the redirect:

    <%@ Page Language="VB" EnableSessionState="False" EnableViewState="False" Trace="False" Debug="False" Strict="True" %> 
    <script language="vb" runat="server">
      Sub Page_Load(sender as Object, e as EventArgs)
    		Response.Status = "301 Moved Permanently"
    		Response.AddHeader("Location", "https://mysite.mycompany.com/rdweb")
      End Sub
    </script>

    Thanks.

    -TP

    Tuesday, July 31, 2012 5:44 PM
  • Hi, 

    I am experiencing an issue where HTTP Redirect does not seem to do anything.  I am using server 2012 and IIS 8

    Under Default Website > HTTP Redirect I have

    checked "Redirect requests to this d estination:

    https://corprdg.contoso.com/rdweb

    checked "Only redirect requests to content in this directory (not subdirectories)

    Status code 301

    Under RDWeb > HTTP Redirect I have

    checked "Redirect requests to this d estination:

    /RDWeb/Pages/default.aspx

    checked "Only redirect requests to content in this directory (not subdirectories)

    However after testing https://corprdg.contoso.com it is not rewriteen to https://corprdg.contoso.com/rdweb

    I've done multiple IISRESET and various other settings, it seems nothing works.  

    Any ideas?  I'd like to avoid customizing the default.aspx.

    Wednesday, August 14, 2013 9:14 PM