Redirect to the Remote Web Access pages (/RDWeb)


If you have published Remote Desktop Web Access out of the box, and you visit
http(s)://<url for remote desktop web access>, you’ll be presented with the IIS welcome page:
IIS Welcome page

To prevent this you need to redirect the root to /RDWeb.

On the RD Web Access server(s) open Internet Information Services (IIS) Manager (it’s under Administrative Tools).
Expand the tree and click Default Web Site, then open the “HTTP Redirect” app:
HTTP Redirect
Fill in the redirect path, don’t forget to check “Only redirect requests to content in this directory”, and click apply.

That’s it. No need to reset IIS. This is tested to be working on Windows 2012 and Windows 2012 R2 versions of RD Web Access.

As an added bonus, HTTP requests are redirected to HTTPS as well.

Arjan

20+ years experience in Microsoft powered environments. Enjoy automating stuff using scripts, powershell, and even batch files. In my free time (hah! as if there is any) I hunt achievements and gamerscore on anything Xbox Live enabled (Windows Mobile, Windows 8, Windows 10, Xbox 360 and Xbox One). When I'm not doing that I enjoy traveling or riding my Yamaha R1 on the edge ;)

Tagged with: , , , ,
Posted in Remote Desktop, Windows 2012, Windows 2012 R2
17 comments on “Redirect to the Remote Web Access pages (/RDWeb)
  1. Momo says:

    HTTP to HTTPS redirect is not happening for me. Can you please explain how to make it so?

    • Arjan Mensch says:

      Hi Momo,
      On IIS, the website that holds the /rdweb app, right-click the website and check “Bindings”. Make sure port 80 is listed for that website. If the website is listening on both 80 and 443, http to https redirection will happen with the settings described in this post.

  2. Momo says:

    Yes, it’s listening on both 80 and 443. But for some reason redirect is not happening.
    What else could be causing it not to work in your opinion?

  3. Hi,
    I had the same issue as Momo, https redirect works perfectly, however i discovered today http redirect was pointing me back to the default IIS page.

    However, I fixed it by doing the following. This will use the default.asp page in the root directory to do the HTTP to HTTPS, along with URL redirect.

    1. Make sure HTTP redirect is disabled (if it was set from the instructions above, following code works for both HTTP and HTTPS)
    2. Create a default.asp page with the following code

    3. Paste the default.asp into c:\inetpub\wwwroot directory

    4. click Default Web Site, then open the “Default Document” icon

    5. Move Default.asp to the top of the tree.

  4. <%
            If Request.ServerVariables("SERVER_PORT")=80 Then
                    Response.Redirect "https://" & Request.ServerVariables("HTTP_HOST") & "/RDWeb"
            ElseIf Request.ServerVariables("SERVER_PORT")=443 Then
                    Response.Redirect "https://" & Request.ServerVariables("HTTP_HOST") & "/RDWeb" 
            End If
    %>
    
    • Arjan Mensch says:

      Hi David,
      Sorry for the late reply, was on vacation :)
      Thanks for this, that should work as well.
      However,
      If the IIS redirect is not working, something is amiss. Although your solution works, it’s a workaround for the problem which then still exists.

  5. Brian says:

    Had same issue with HTTPS was working but HTTP was not, I was able to back out the change do it again makeing sure to click apply in the top right corner this time and it worked

  6. Mahe says:

    Hi,
    I have setup my RDS 2012 R2 with separate servers, like RD gateway, RD web, RD SH, RD connection broker.

    I have my rdweb role on the gateway server as well so am able to access resourses INTERNALLY and EXTERNALLY.

    My Issue when i remove that RD web Role from Gateway server,am getting error 404 and so i have followed the above steps(HTTP REDIRECT) on my RDweb server(Individual server).

    Is Rd Gateway should have rd web role, if not what else has to be done to achieve the access.

    • Arjan Mensch says:

      Hi Mahe,
      Make sure that when you removed the RD WA role from the RD GW server, that your deployment recognizes the remaining RD WA role on the other server. You can see this in the deployment overview. Also, as a best practice, if you separate the roles, use different certificates for the roles.
      And to answer your question: RD GW can go perfectly fine on a separate server, you don’t need to have RD WA on that same server.

  7. Max says:

    Hello Arjan. Thank you very much for your work. I followed your steps and everything works perfectly. I have a quick question though. I noticed that under Default Web Site the Rpc and RpcWithCert virtual subdirectories are also inheriting the redirection. Do we want this behavior? Is it ok if the remote desktop client tries to reach https://gate.company.com/rpc and is being redirected to RDWeb instead?

    Thanks!

  8. Andre says:

    Its possible to use a federate authentication (for example Shibboleth) to autenticate users in rdweb?

  9. Adam Smith says:

    Hello.

    I can access https://fqdn/rdweb on my internal network, but not externally. I can see the traffic get through my firewall, but it times out if coming from outside the network.

    Any thoughts? Thank you!

    • Arjan Mensch says:

      Hi Adam,
      I’d check routing from the webaccess / gateway server back to the internet, windows firewall on the webaccess / gateway server. Make sure the server has just 1 IPv4 address.. Maybe, if webaacess and gateway roles are on the same server, modify your RAP to allow all computers and your CAP to allow all users, just to check. Other than that I don’t have any quick tips.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Authors
Donate Button

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 322 other followers

Blog Stats
  • 1,913,769 hits
%d bloggers like this: