【发布时间】:2014-01-08 22:02:20
【问题描述】:
由于使用了相对 URL,Google Crawler 以某种方式错误地将我们的网站编入索引。 在对 Google 中的索引 URL 进行彻底分析之后,我们得出的结论是,我们应该通过使用尾部斜杠之后的部分来重定向 URL,但有一些例外。因此,我们尝试将其中许多 URL 以及它们应该如何重定向到下面。
/a.php/ - Redirect to /a.php
/a.php// - Redirect to /a.php
/a.php - Retain as it is
/a.html - Retain as it is
/a.php/a.html - Redirect to /a.html
/a.php/b.php?a=b - Redirect to /b.php?a=b
/a.html/b.php - Redirect to /b.php
/a.html/b.php/c.html - Redirect to /c.html
/a.php/b.php?a=b/c.php?a=b - Redirect to /c.php?a=b
/a.html/b.php - Redirect to /b.php
请注意 /index.php 已经被重定向到 www.domain.com 您能否帮我们提供一个 htaccess 代码,我们可以使用它来实现这些重定向
【问题讨论】:
-
你需要展示你已经尝试过的东西。
-
我们尝试了一些不起作用的代码。不幸的是我没有这个代码sn-p。但我记得它只能删除尾部斜杠。总而言之,它没有用。