Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIS URL 重写规则表现为重定向 #121

Closed
Dream4ever opened this issue Jan 3, 2021 · 0 comments
Closed

IIS URL 重写规则表现为重定向 #121

Dream4ever opened this issue Jan 3, 2021 · 0 comments
Labels
Server The invisible hero Software About installation ande usage

Comments

@Dream4ever
Copy link
Owner

解决过程

在重装服务器系统为 Windows Server 2012 R2 之后,按照常规流程添加了 IIS 的功能,并且安装了 URL 重写模块。

但是发现部分设置为重写的规则却表现为重定向

用关键字 iis URL rewrite rule redirect instead 搜索,Stack Overflow 上有人说是触发了 courtesy folder redirect,如果重写的目标路径是文件夹,应当在文件夹末尾添加 /,这样就能够让重写规则按预期的生效了。

测试了几个规则,果然解决问题了,而且之前 404 的页面也能正常访问了,可能就是被别的有问题的规则影响了。

参考资料

@Dream4ever Dream4ever added Server The invisible hero Software About installation ande usage labels Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server The invisible hero Software About installation ande usage
Projects
None yet
Development

No branches or pull requests

1 participant