如何实现网站过渡的302重定向?
我有一个旧网站,多年来一直没有受到太多人的喜爱,而这种情况即将改变。现有站点基于名为 DotNetNuke (DNN) 的 ASP.NET 门户框架 3.* 版本。
我将删除该站点并创建一个基于名为 Nanoc(基于 Ruby)的静态站点生成器的新站点。我将使用 nginx 为该网站提供服务。
我不知道如何在新网站上重定向旧页面。许多新页面将是全新的;一些旧页面将不会被备份。我怀疑会有一些我想以某种形式保留下来,但肯定不会使用相同的网址。
我应该关心在网站上的每个页面上进行细粒度重定向(这不是一个大网站),还是只用一般重定向来处理它?
I have an old website that hasn't gotten much love over the years and that's about to change. The existing site is based on a 3.* version of an ASP.NET portal framework called DotNetNuke (DNN).
I'm going to pull that site down and bring up a new site based on a static site generator called Nanoc (Ruby based). I'll be serving the site with nginx.
I'm not sure how to go about redirecting the old pages on the new site. Many of the new pages will be completely new; several of the old pages will not be back up. I suspect there will be a few that I'll want to keep alive in some form, but certainly not with the same urls.
Should I be concerned with doing a fine grained redirect on each of the pages on the site (it's not a large site), or just handle it with a general redirect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需要在您希望搜索引擎知道更改的链接上使用 301(永久重定向,比 302 更好),或者是否有人可能将它们添加为书签。除此之外,我只是将看起来像旧 URL 的 404 重定向到您的新主页。
You only need to bother with 301's (permanent redirect, better than 302) on links you want search engines to know changed, or if people might have them bookmarked. Other than that, I would just redirect 404's that look like an old URL to your new home page.