301重定向博客到另一台主机,并保持谷歌排名 [英] 301 redirect Blogger to another Host and keep Google rank

查看:263
本文介绍了301重定向博客到另一台主机,并保持谷歌排名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我对任何拼写错误道歉。我是法国人。

first, I apologize for any spelling error. I am french.

我想你的东西,可能有一个简单的解决帮助,但我还没有发现任何具体的,以我的情况。

I'd like your help for something that may have a simple fix, but I have not found anything specific to my case.

说明

我对博客平台网站,并在Godaddy的两年左右注册域名。但现在,我很高兴,因为这个平台的许多局限性的存在。我有大约300职位公布,并在这个博客索引。

I have a site on Blogger platform and a domain registered at Godaddy for about two years. But nowadays, I'm unhappy there because of the many limitations of this platform. I have about 300 posts published and indexed in this blog.

好吧,我刚刚创建自己的静态网站(与许多HTML文件和一些CSS / JS),并买了一个Godaddy的Linux主机(豪华的cPanel)也。我创建父域的子域(这是指着博客)来测试这个新的静态网站。一切都工作正常,并准备去...

Well, I've just create myself a static website (with many HTML files and some CSS/JS) and bought a Linux Hosting (Deluxe with cPanel) on Godaddy also. I created a subdomain in the parent domain (which is pointed at the Blogger) to test this new static site. Everything's working fine and ready to go...

问题

正如我所说,我已经收录300职位。我创建了所有这些博客文章中,我想要的方式,与友好URL和其他自定义新的HTML文件。为什么? Blogger的显示我的链接这样的:mywebsite.com/2010/06/post-name.html。我对这个新网站的目的是做这样的事情mywebsite.com/post-name.html。我在子域设置的路径,一切都多。

As I said, I have 300 posts already indexed. I created new HTML files for all these Blogger posts, the way I want, with friendly URL and other customizations. Why? Blogger show my links like this: "mywebsite.com/2010/06/post-name.html." My intention for this new site is to do something like "mywebsite.com/post-name.html". I've set up the paths and everything more in the subdomain.

我的问题是:我如何从重定向旧网站(博客)新交通不失谷歌排名和搭桥的时候进行了走访旧链接404 Not Found错误

My question is: How do I redirect the traffic from the old site (Blogger) to the new without losing Google Rank and "bypass" a 404 Not Found error when old links were visited?

我已经做了谷歌上搜索数,只发现教程介绍如何在博客迁移到Word preSS做到这一点。

I've done several searches on Google and only found tutorials that show how to do this in the migration Blogger to Wordpress.

我知道我不能只是删除Blogger上这个网站,(也许)东西可以.htaccess文件来解决它做。我不得不关闭的博客现在和重定向和301重定向访问者到新的主机,以prevent谷歌惩罚我重复的内容,对吧?

I know I can't just delete this site on Blogger and (perhaps) something can be done in .htaccess file to solve it. I have to "close" Blogger for now and redirect visitors with a 301 Redirect to the new host to prevent Google punish me for duplicate content, right?

谷歌搜索,我发现这个code:

Googling, I found this code:

   <b:if cond='data:blog.url == &quot;http://example.com/2013/01/post-name.html&quot;'>
<meta content='0;url=http://example/post-name.html' http-equiv='refresh'/>
</b:if>

但它是一个博客对词preSS教程。

But it was a Blogger-to-Wordpress tutorial.

在code以上可以在我的情况适用?或者我应该在的.htaccess中创建邮寄重定向后?

The code above could be applied in my case? Or should I just create a redirect post by post within the .htaccess?

我AP preciate任何建议和帮助。

I appreciate any suggestion and help.

推荐答案

如果你有你的域名指向博客到现在为止,也就有了它指出在未来的新服务器,那么今后所有申请将达到新的服务器自动。因此,所有你必须​​做的是建立所有的老的网址为新目标的重写新的服务器上。

If you had your domain pointed at blogger until now, and will have it pointed at your new server in the future, then all future requests will reach your new server automatically. So all you will have to do is set up the rewriting of all "old" URLs to the new targets on your new server.

通过在评论中提到由你一个重定向指令,你应该能够做到这一点。使用这种技术,你就需要使用重定向为要重定向到一个新的每一个旧的URL。

With a Redirect directive as mentioned by you in comments, you should be able to achieve that. Using this technique, you will need to use a Redirect for each old URL you want to redirect to a new one.

如果的所有的的旧网址遵循 /yyyy/mm/post-name.html 的模式,所有的新网址只是 /post-name.html 与岗位名称是仍然是相同的,您可能需要使用重写规则而不是:

If all of your old URLs follow the pattern of /yyyy/mm/post-name.html, and all of your new URLs are just /post-name.html with the post names being still the same, you might want to use a RewriteRule instead:

RewriteEngine On
RewriteRule ^([0-9]{4})/([0-9]{2})/(.*)$ /$3 [R=301]

这将匹配上有四个数字(领先的斜线将在这一点被剥离的话),跟一个斜线开始的所有传入的请求,后面两个数字和另一个斜线,再经过只是东西这一点,将其重定向到任何东西。这将是自动与协议和服务器名称pfixed $ P $。和 [R = 301] 标志将使这一带301状态code重定向。

This will match on all incoming requests that start with four digits (the leading slash will have been stripped off at that point already), followed by a slash, followed by two digits and another slash, and then just "anything" after that, and will redirect it to that "anything". It will be prefixed with the protocol and server name automatically. And the [R=301] flag will make this a redirect with 301 status code.

这样的话,你可以捕捉到所有的旧文章的网址只有一个规则,就不必写每个单独的一个重定向语句。

That way, you could catch all of those old post URLs with just one rule, and would not have to write a Redirect statement for each one individually.

(如果您需要了解如何运作的更多信息,请参阅 mod_rewite文档第一的。)

(If you need more information about how this works, please consult the mod_rewite documentation first.)

这篇关于301重定向博客到另一台主机,并保持谷歌排名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆