URL Rewrite Rules to allow subdirectory in the URL

Rob Blackwood 1 Reputation point
2022-11-22T23:04:40.407+00:00

Hello,

I am running IIS on a Windows 2019 server. I've installed ARR and rewrite tools. IIS has two websites running on it.

Site 1: The Default website bound to port 443. Additionally, I have a second website running .Net application, DataHubWeb, running on port 8090.

I'm trying to work out a set of URL rewrite/ARR rules that will perform the following:

Serve the public URL: https://sam.a.company.com/datahub. While the internal application is located at: https://localhost:8090.

Any help is greatly appreciated.

Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Sam Wu-MSFT 7,526 Reputation points Microsoft Vendor
    2022-11-23T08:57:48.41+00:00

    @Rob Blackwood

    I guess I'm asking for recommendations that will allow me to respond to a public URL, https://sam.a.company.com/datahub, with an application located at: localhost:8090.

    If you want to rewrite from https://sam.a.company.com/datahub to localhost:8090, you can try this rule:

    Open IIS -> open URL rewrite module from website level -> add rule -> blank rule.

    263401-1.png


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.