我正在尝试使用IIS URL重写来重写:
platformsite / folder_name_here 到 platformsite.company.com/folder_name_here
规则如下({:
<rule name="test" >
<match url="^platformsite" />
<action type="Rewrite" url="{R:0}.company.com/" />
但是,这不起作用。找不到404错误反而是我得到的。原谅我,因为我是IIS中URL重写的新手,所以将不胜感激任何帮助。
更新10/8
点击了此链接https://blog.lextudio.com/the-very-common-mistakes-when-using-iis-url-rewrite-module-a2ab7e4fee59之后,我设法使用以下内容进行操作,但仍然得到了404。
<rewrite>
<rules>
<rule name="Rewrite to some page">
<match url="folder_name_here" />
<conditions>
<add input="HTTP_HOST" pattern="^platformsite$" />
</conditions>
<action type="Redirect" url="platformsite.company.com/folder_name_here"; />
</rule>
</rules>
</rewrite>