0

We have a rewrite rule in place to forward demo.website.com to the subfolder which contains the Demo website (website.com/Demo).

The problem is that it is still using the root web.configs db connection, instead of the connection string in wwwroot\Demo\web.config.

Here is the rule:

<rule name="demo rewrite" enabled="true">
  <match url="^(.*)$" />
    <conditions>
      <add input="{HTTP_HOST}" pattern="^demo\.website\.com$" />
    </conditions>
    <action type="Rewrite" url="Demo/{R:1}" redirectType="Permanent" />
</rule>

Is there something I am missing here?

Jack
  • 119
  • 4
  • Downvote: Care to explain? Or was this just a drive-by downvote? – Jack Jul 07 '15 at 19:07
  • So when accessing website.com/demo directly without a rewrite the database connection string is correct? Is /demo its own application? – Peter Hahndorf Jul 08 '15 at 02:58
  • @PeterHahndorf correct, when accessing directly the correct DB connection is used. /Demo is its own application under the Default Web Site. – Jack Jul 08 '15 at 13:55

0 Answers0