从客户端缓存中删除 http301 重定向
我有一个服务器/客户端体系结构,其中客户端通过某个主机名、IP 地址和端口访问 ASP.NET 服务器的服务。我不假思索地登录到服务器,并通过 IIS 设置永久 HTTP301 重定向,从该服务到计算机通过 IIS 处理的另一个 URL(相同的 IP 和端口),错误地认为这是托管在那里的另一个站点。当客户端访问旧主机名的服务器时,它会缓存永久重定向。现在,即使我已经删除了重定向,客户端也不再使用旧地址。如何清除客户端的缓存,使其不再存储重定向?
我已经了解了 HTTP301 的持久性,但在这种情况下,应该可以重置单个客户端对错误学习的主机名的了解。有什么想法吗?
I have a server/client architecture where the client hits the ASP.NET server's service at a certain host name, IP address, and port. Without thinking, I logged on to the server and set up permanent HTTP301 redirection through IIS from that service to another URL that the machine handles via IIS (same IP and port), mistakenly thinking it was another site that is hosted there. When the client hit the server at the old host name, it cached the permanent redirect. Now, even though I have removed the redirection, the client no longer uses the old address. How can I clear the client's cache so that it no longer stores the redirect?
I have read about how permanent HTTP301 can be, but in this case, it should be possible to reset a single client's knowledge of the incorrectly-learned host name. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HTTP 状态代码 301 在 RFC 2616 中明确定义为
,这意味着您必须要求所有客户端重新验证资源。如果您有一个可以将更新推送到客户端的系统,也许您可以推送更新以再次使用相同的 URI,但强制重新验证。
您在服务器端所做的任何操作都无济于事 - 事实上,通过删除 IIS 中的永久重定向,您已经采取了所有应该采取的措施。
The HTTP status code 301 is unambiguously defined in RFC 2616 as
which means you have to go ask all your clients to revalidate the resource. If you have a system where you can push updates to your clients, perhaps you can push an update to use the same URI again, but force a revalidation.
Nothing you do on the server side will help - in fact, by removing the permanent redirect in IIS you have already taken all measures you should.