1

i'm using below rule to rewrite URL as subdomain.

<rewrite>
  <rules>
    <rule name="Redirect to Subdomains" stopProcessing="true">
      <match url="^LandingPage.aspx$" />
      <conditions>
        <add input="{QUERY_STRING}" pattern="^val=(.+)$" />
      </conditions>
      <action type="Rewrite" url="http://{C:1}.{HTTP_HOST}" appendQueryString="false" />
    </rule>
  </rules>
</rewrite>

but it's not working. it's taking me to the Main domain. I've added wild card DNS in my SOA hosting file. and have installed ARR on IIS with proxy mode enabled.

I'll be entering URL as http://www.example.com/LandingPage.aspx?val=somevalue

And this rule rewrite it as somevalue.example.com/. Still it's not working. Please correct me where I'm going wrong.

Dan Atkinson
  • 11,391
  • 14
  • 81
  • 114
Mayank Pathak
  • 3,621
  • 5
  • 39
  • 67

0 Answers0