IIS重写显示URL

时间:2015-06-11 21:17:46

标签: mod-rewrite iis iis-8

  • 我在etreecycle.co.uk/austincollins /.
  • 上有一个目录
  • 我想将子域名austin.etreecycle.co.uk指向/ austincollins /.
  • Inside / austincollins /有一个名为/ test /.
  • 的文件夹
  • 所以要到/ austincollins / test / url应该是austin.etreecycle.co.uk/test /.
  • 但网址显示为austin.etreecycle.co.uk/austincollins/test /.

以下是重写规则:

<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>

如何从URL中删除/ austincollins /,为什么显示?

此外:
当你去austin.etreecycle.co.uk时,它会在/ austincollins /中显示索引文件。这就是为什么我不明白你为什么要去austin.etreecycle.co.uk/austincollins/dev/而不仅仅是/ dev /.

0 个答案:

没有答案