如何解决www IIS重写不尊重localhost
我用谷歌搜索死了,没有运气就读了StackOverflow上的所有条目。我的本地开发环境未遵循以下重写规则。
<rule name="WWW-Rewrite" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{HTTP_HOST}" negate="true" pattern="^www\.(.*)$" />
<add input="{HTTP_HOST}" negate="true" pattern="ft-ue-firstsav-com" />
<add input="{HTTP_HOST}" matchType="Pattern" pattern="^localhost(:\d+)?$" negate="true" />
<add input="{HTTP_HOST}" matchType="Pattern" pattern="^127\.0\.0\.1(:\d+)?$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
要解决此问题,我进行了慢速的猎豹转换,在调试模式下将启用的属性从true翻转为false。在此有效的同时,我希望实际的规则有效。
有没有建议?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。