Redirect 重写URL重定向
我正在尝试从此地址重新写入URL: 致此地址: 我试试这个:Redirect 重写URL重定向,redirect,iis,http-redirect,Redirect,Iis,Http Redirect,我正在尝试从此地址重新写入URL: 致此地址: 我试试这个: <rule name="test01Generic" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^(\S+?).test-01.mysite.co$" /> </conditions> &l
<rule name="test01Generic" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(\S+?).test-01.mysite.co$" />
</conditions>
<action type="Redirect" url="https://mysite.co/nz/test-01/{C:1}" redirectType="Found" />
</rule>
因此:
查询参数加倍
关于我遗漏了什么有什么想法吗?请将{REQUEST_URI}修改为{URL},并将appendQueryStrin保留为true,然后它就会工作
<rule name="test0Generic" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(\S+?).test-01.mysite.co$" />
</conditions>
<action type="Redirect" url="https://mysite.co/nz/test-01/{C:1}{URL}" appendQueryString="true" redirectType="Found" />
</rule>
请将{REQUEST_URI}修改为{URL},并将appendQueryStrin保留为true,这样它就可以工作了
<rule name="test0Generic" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(\S+?).test-01.mysite.co$" />
</conditions>
<action type="Redirect" url="https://mysite.co/nz/test-01/{C:1}{URL}" appendQueryString="true" redirectType="Found" />
</rule>
我能够解决这个问题,我必须将{REQUEST\u URI}
更改为{PATH\u INFO}
<rule name="test01Generic" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(\S+?).test-01.mysite.co$" />
</conditions>
<action type="Redirect" url="https://mysite.co/nz/test-01/{C:1}{PATH_INFO}" redirectType="Found" />
</rule>
我正在重定向到此地址:
我能够解决这个问题,我必须将{REQUEST\u URI}
更改为{PATH\u INFO}
<rule name="test01Generic" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(\S+?).test-01.mysite.co$" />
</conditions>
<action type="Redirect" url="https://mysite.co/nz/test-01/{C:1}{PATH_INFO}" redirectType="Found" />
</rule>
我正在重定向到此地址:
重定向与重写不同。另外,您是否考虑改用ARR?重定向与重写不是一回事。另外,您是否考虑改用ARR?