从客户端缓存中删除 http301 重定向

发布于 2024-08-27 18:52:03 字数 299 浏览 5 评论 0原文

我有一个服务器/客户端体系结构,其中客户端通过某个主机名、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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妄断弥空 2024-09-03 18:52:03

HTTP 状态代码 301 在 RFC 2616 中明确定义为

以后任何对此的引用
资源应该使用其中之一
返回的 URI

,这意味着您必须要求所有客户端重新验证资源。如果您有一个可以将更新推送到客户端的系统,也许您可​​以推送更新以再次使用相同的 URI,但强制重新验证。

您在服务器端所做的任何操作都无济于事 - 事实上,通过删除 IIS 中的永久重定向,您已经采取了所有应该采取的措施。

The HTTP status code 301 is unambiguously defined in RFC 2616 as

any future references to this
resource SHOULD use one of the
returned URIs

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文