IIS Url canonical rewrite, but preserve IP Address access

感情迁移 提交于 2019-12-25 03:27:27

问题


I'm a little stumped. We have a load balancer in front of our web servers, and rules in place to do a canonical rewrite from myDomain.com to www.mydomain.com.

This works great, but prior to adding this rule, I could hit my individual servers by IP address (bypassing the load balancer), and therefore check statuses, etc.

I've tried adding a rule first to allow the IP address, but it still seems to process the others regardless of my settings.

This is IIS 7.0. any help would be greatly appreciated on how to write the rules correctly.


回答1:


Ok, finally figured it out. I added another canonical rule above my domain name canonical rule that matches the pattern of my IP address, and then just told it to do nothing, and stop processing rules.

It works.



来源:https://stackoverflow.com/questions/3090377/iis-url-canonical-rewrite-but-preserve-ip-address-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!