htaccess 301 重定向
我以前有一个 WordPress 博客,后来删除了。现在我在谷歌搜索结果中有很多我的旧博客网址。这里有一个免费的例子,
http://mywebsite.com/2011/01/3360
http://mywebsite.com/2011/06/3450
http://mywebsite.com/2011/02/3456
http://mywebsite.com/2010/01/3547
http://mywebsite.com/2010/02/2264
我如何重定向所有以 2010 和 2011 开头的死网址。如果我必须将每个 url 输入到 htaccess 文件中,我的 htaccess 文件会变得很长。
i used to have a wordpress blog and removed it. Now i have a lot of my old blog urls in Google search results. Here are a fre examples
http://mywebsite.com/2011/01/3360
http://mywebsite.com/2011/06/3450
http://mywebsite.com/2011/02/3456
http://mywebsite.com/2010/01/3547
http://mywebsite.com/2010/02/2264
How can i redirect all dead urls that start with 2010 and 2011 in it. My htaccess file would get very long if i had to input each url into the htaccess file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的 .htaccess 文件中包含以下规则:
Have this rule in your .htaccess file: