使用URL重写子域;下载文件失败
我当前在web.config文件中有此重写URL规则使用URL重写子域;下载文件失败,url,iis,url-rewrite-module,Url,Iis,Url Rewrite Module,我当前在web.config文件中有此重写URL规则 <rule name="Rewrite to qa" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^qa.golfgameskeeper.com$" /> &l
<rule name="Rewrite to qa" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^qa.golfgameskeeper.com$" />
</conditions>
<action type="Rewrite" url="qa/{R:1}" />
</rule>
它工作得很好,使qa.golfgameskeeper.com/qa像qa.golfgameskeeper.com一样工作
然而,当我试图从qa的子目录下载一个文件时,它似乎感到困惑
将列出该文件,但不允许我下载
即使单击其中一个,规则上方的链接也会将链接重新写入
qa.golfgameskeeper.com/qa/apps/iOS剪切粘贴将起作用,而不是单击链接
有没有办法修改此规则以允许我尝试执行的操作?所以,当我写这篇文章的时候,我明白了我想要做什么
有
qa.golfgameskeeper.com->qa.golfgameskeeper.com/qa works
允许
qa.golfgameskeeper.com/apps/iOS下载该文件,而无需重写两次URL,我认为它就是这样做的
谢谢,您可以在重写规则之前添加一条规则,以便在“应用程序”子目录中匹配,而不执行任何操作,基本上跳过重写规则
<rule name="Skip apps" stopProcessing="true">
<match url="^apps/(.*)" />
<action type="None" />
</rule>
<rule>
//your rewrite rule here
</rule>