-
Notifications
You must be signed in to change notification settings - Fork 6
IIS URL 重写规则表现为重定向 #121
Copy link
Copy link
Closed
Labels
ServerThe invisible heroThe invisible heroSoftwareAbout installation ande usageAbout installation ande usage
Description
解决过程
在重装服务器系统为 Windows Server 2012 R2 之后,按照常规流程添加了 IIS 的功能,并且安装了 URL 重写模块。
但是发现部分设置为重写的规则却表现为重定向。
用关键字 iis URL rewrite rule redirect instead 搜索,Stack Overflow 上有人说是触发了 courtesy folder redirect,如果重写的目标路径是文件夹,应当在文件夹末尾添加 /,这样就能够让重写规则按预期的生效了。
测试了几个规则,果然解决问题了,而且之前 404 的页面也能正常访问了,可能就是被别的有问题的规则影响了。
参考资料
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ServerThe invisible heroThe invisible heroSoftwareAbout installation ande usageAbout installation ande usage