是否可以告诉 Google 翻译不要翻译网站的一部分,在这种情况下,是<head>部分?
例如:
<head>
<title>Post by John Doe</title>
<meta content="Article by John Doe, some brand name here" name="description" />
</head>
Run Code Online (Sandbox Code Playgroud)
在这个例子中,John Doe 和一些真正的品牌名称可能被“翻译”为其他东西,通常是错误的翻译。
根据https://cloud.google.com/translate/v2/faq#technical <span class="notranslate"> </span>围绕html中的文本可以用于此。但是,在页面标题或描述中使用 span 类将导致<span class="notranslate"> </span>在搜索引擎结果中向用户显示 普通页面标题或描述文本。
例如,如果我可以将页面标题或页面描述中的部分文本用“”、[ ] 或 ( ) 之类的其他内容包装起来,其他任何看起来正常的内容。
任何的想法?
我希望重定向www.mysite.com/index.html
至
www.mysite.com/
但我不希望用index.html重定向所有地址
www.mysite.com/folder/index.html
至
www.mysite.com/folder/
因此,只需将第一个index.html页面重定向到站点的根目录.