[英]Website localization when already indexed on search engines
我发现了许多有关如何本地化网站的主题,最常见的解决方案是添加子域或创建不同的子目录(例如“ / en /”)。 但是,我找不到担心为最初只针对一种语言进行本地化的网站失去Google索引的担心。
从现在开始,Google设法将页面编入索引,如下所示:
http://website.com/threads/this-is-the-title/11111
每当我决定选择不同子目录中的本地化时,它将是:
http://website.com/en/threads/this-is-the-title/11111
Google对页面索引的乱码会发生什么? 您能帮我找出解决方案来对网站进行本地化而又不会遇到Google问题吗?
我发现部分解决了问题
Hreflang: https : //support.google.com/webmasters/answer/189077?hl = zh_CN
除了我将在两个不同文件夹级别上进行本地化之外,这将起作用:
/
...files of already index content
/en
...files of the second language
更新:
当前的htaccess文件:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^threads/(?:([a-zA-Z0-9-_]+\/)?)([0-9]+)$ thread.php?qid=$2 [QSA,L]
...other
我把那条线变成:
RewriteRule ^(?:([a-zA-Z]+\/)?)threads/(?:([a-zA-Z0-9-_]+\/)?)([0-9]+)$ $1/thread.php?qid=$3 [QSA,L]
这还不够,因为它不会重定向到本地化的子目录。
使用.htaccess和mod-rewirte 告诉 Google该网址已移至另一个uri
例如
RewriteEngine On
RewriteRule ^oldsite\.html$ /newsite.html [R=301,L]
谷歌适合你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.