【发布时间】:2022-01-26 17:57:46
【问题描述】:
我有一个站点,并且我有该站点的临时副本。 在登台站点的 IIS 中,我编写了一个规则来添加 /site-staging/ 当 url 中缺少时,这是 web.config 规则:
<rule name="add /site-staging/ when missing">
<match url="testsite.it\/(?!site-staging)" />
<action type="Rewrite" url="testsite.it/site-staging/" />
</rule>
我需要将testsite.it/helloword 转换为testsite.it/site-staging/helloword
有人可以帮助我吗?我要疯了:(
【问题讨论】:
-
你可以从blog.lextudio.com/…的错误1开始
-
你能澄清你的问题吗?您是否要从
testsite.it/helloword重写为testsite.it/site-staging/helloword?还是其他需求? -
@samwu,是的,以及所有其他页面 testsite.it/helloword -> testsite.it/site-staging/helloword testsite.it/hello -> testsite.it/site-staging/hello testsite .it/byebye -> testsite.it/site-staging/byebye
标签: iis url-rewriting web-config