IIS Rewrite Showing Subdirectory Name In URL

57 views Asked by At
  • I have a directory at etreecycle.co.uk/austincollins/.
  • I want to point the subdomain austin.etreecycle.co.uk to /austincollins/.
  • Inside /austincollins/ there is a folder called /test/.
  • So to get to /austincollins/test/ the url should be austin.etreecycle.co.uk/test/.
  • But the url shows as austin.etreecycle.co.uk/austincollins/test/.

Here is the Rewrite rule:

<rule name="austin.etreecycle.co.uk" stopProcessing="true">
    <match url=".*" />
    <conditions>
        <add input="{HTTP_HOST}" pattern="^austin.etreecycle.co.uk$" />
        <add input="{PATH_INFO}" pattern="^/austincollins/" negate="true" />
    </conditions>
    <action type="Rewrite" url="\austincollins\{R:0}" />
</rule>

How can I remove the /austincollins/ from the URL, and why is is showing?

Also:
When you go to austin.etreecycle.co.uk it shows the index file in /austincollins/. This is why I don't understand why you have to go to austin.etreecycle.co.uk/austincollins/dev/ and not just /dev/.

0

There are 0 answers