过期(但不一定永久过期)URL 的 HTTP 响应代码
我们的网站上有客户画廊,应该在一定时间内可用。一旦图库不再可用,我想将人们重定向到显示图库已过期的 URL。我们还希望能够在必要时重新打开画廊。
我正在尝试找出实现该行为的最佳方法。 302 重定向是最好的方法吗?首先进行重定向(而不是在同一 URL 处显示过期消息)是否合理?此时它是一个静态站点,但它位于 IIS (v. 6) 盒子上,因此如果我需要一个编程解决方案,我会做一些基于 ASP.NET 的事情。
We have client galleries on our website that are supposed to be available to a certain amount of time. Once the gallery is no longer available, I want to redirect people to a URL that says that the gallery is expired. We also want to ability to turn a gallery back on if necessary.
I'm trying to figure out the best way to implement that behavior. Is a 302 redirect the best way? Is it reasonable to do a redirect in the first place (rather than displaying the expired message at the same URL)? At this point it's a static site, but it's on an IIS (v. 6) box, so I'd be doing something ASP.NET based if I needed a programmatic solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试 307。这是一个临时重定向,而不是永久重定向。一旦您确定不再使用图库,您可以将其转换为 301。
在此处查看有关该主题的更多信息:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
try 307. It's a temporary redirect, as opposed to a permanent one. once you're sure you're not using a gallery anymore, you could convert it to a 301.
see more on the subject here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html