Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Having in mind it is easier to do with sub-domain and CNAME, I think that what you are looking for is the <a href="http://www.iis.net/download/urlrewrite" rel="nofollow noreferrer">IIS URL Rewrite module</a>. The following base rules are taken from <a href="http://forums.iis.net/t/1168364.aspx" rel="nofollow noreferrer">this IIS Forum's thread</a>, as a similar situation is described and samples rules are given. You may use them as a base:</p> <pre><code>&lt;system.webServer&gt; &lt;rewrite&gt; &lt;rules&gt; &lt;rule name="CanonicalHostNameRule"&gt; &lt;match url="(.+)/(.*)" /&gt; &lt;conditions&gt; &lt;add input="{HostToRedirect:{HTTP_HOST}/{R:1}}" pattern="(.+)" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="http://{C:1}/{R:2}" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;rewriteMaps&gt; &lt;rewriteMap name="HostToRedirect"&gt; &lt;add key="domain.com/mail" value="mail.domain.com" /&gt; &lt;add key="domain.net/mail" value="mail.domain.net" /&gt; &lt;/rewriteMap&gt; &lt;/rewriteMaps&gt; &lt;/rewrite&gt; &lt;/system.webServer&gt; </code></pre> <p>You may also check <a href="https://stackoverflow.com/questions/632360/how-to-redirect-subfolder-to-query-in-mod-rewrite-for-iis-7-0">this SO question</a>, as it is providing some guides on the problem you are trying to solve.</p> <p><strong>UPDATE WITH SOLUTION</strong></p> <p>This is totally achievable with <a href="http://www.iis.net/download/urlrewrite" rel="nofollow noreferrer">URL Rewrite module for IIS</a> in combination with <a href="http://www.iis.net/download/ApplicationRequestRouting" rel="nofollow noreferrer">ARR module</a>. Then you need to set a Reverse Proxy rule that will rewrite all /products requests to the corresponding web app in the cloud. Your rule will look something like that:</p> <pre><code>&lt;system.webServer&gt; &lt;rewrite&gt; &lt;rules&gt; &lt;rule name="ReverseProxyInboundRule1" patternSyntax="ECMAScript" stopProcessing="true"&gt; &lt;match url="(^products)" /&gt; &lt;conditions&gt; &lt;add input="{CACHE_URL}" pattern="^(https?)://" /&gt; &lt;/conditions&gt; &lt;action type="Rewrite" url="{C:1}://myvompany.cloudapp.net/" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; &lt;/system.webServer&gt; </code></pre> <p>You can tweak this later to fit your exact need, but with the above sample I just achieved what you are looking for.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload