ssliisssl-certificatevirtualhostcname

Trying to set up a "masked URL redirect" (that might not be the correct term)


OK, what I want is, if a person types the URL "test.MyClientsDomain.net" they actually go to "MyCompanyDomain.com" (but the URL bar shows "test.MyClientsDomain.net").

Here is what I have done so far:

But it's not working as I want, can you tell me what I am doing wrong?


Solution

  • According to your description, when you type test.MyClientsDomain.net in the browser, you want to be redirected to MyCompanyDomain.com, but the URL bar of the browser still displays test.MyClientsDomain.net.

    In IIS, to achieve this effect you need to use the URL Rewrite module and configure proxy settings for ARR. If you have not installed the ARR module on IIS, you can refer to this link.

    When you have two websites, the domain name of website 1 is bound to MyCompanyDomain.com, and the domain name of website 2 is bound to test.MyClientsDomain.net. If you want to achieve your needs, you need to create a rewrite rule on website 2. The following URL rewrite rule in the web.config can give you a reference:

    <rewrite>
                <rules>
                    <rule name="test rule in website2" enabled="true">
                        <match url=".*" />
                        <action type="Rewrite" url="http://MyCompanyDomain.com" />
                    </rule>
                </rules>
            </rewrite>
    

    Also, you need to select Application Request Routing Cache module at server level and select "Server Proxy Settingsā€¦" on the right tree node , then check "Enable Proxy" and apply.

    At this time, when you type test.MyClientsDomain.net in the browser, you will see that the page loads the content of the MyCompanyDomain.com website, and the URL bar still shows test.MyClientsDomain.net.

    image1