网站管理员工具在基于 Kohana 的网站中显示 /a 为 404?

发布于 2024-10-17 16:46:35 字数 156 浏览 9 评论 0原文

我注意到在使用各种 Kohana 网站时,网站管理员工具几乎总是将 /a 标记为 404'ing。我没有具体的代码可以向您展示,因为它几乎出现在所有代码中。

我只是想知道是否还有其他人遇到过或已经解决了这个问题。这是一个已知问题吗?

谢谢。

I have noticed when working with various Kohana sites that webmaster tools almost always flags up /a as 404'ing. I have no specific code to show you because it occurs in pretty much all of them.

I just wondered if anyone else had or has fixed this problem. Is it a known issue?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

恬淡成诗 2024-10-24 16:46:35

请提供更多信息。

/a 是您网站中的有效位置吗?当然,如果 /a 不存在,它会被标记。

Please provide some more information.

Is /a a valid location in your website? Of course it's going to flag /a if it doesn't exist.

枕头说它不想醒 2024-10-24 16:46:35

jQuery 是 Googlebot 获取的代码的根源。在 jQuery 文件本身中有这一行...

<a href='/a' style='color:red;float:left;opacity:.55;'>a</a>

根据 Google(见下文),将 301 重定向添加到 htaccess 文件以永久解决此问题。

Redirect 301  /a  http://www.mySite.com

以下是 Google 员工 JohnMu 在 我在 Google 网上论坛发起的帖子

穆约翰

Google 员工

凌晨 4:39

大家好

对此有一个简短的说明 - 是的,我们
许多人都选择了“/a”链接
来自 jQuery JavaScript 的站点。然而,
这通常不是问题,如果我们
将“/a”视为 404,那么那就是
对我们来说很好。
与其他 404-URL 一样,
我们会将其列为抓取错误
网站站长工具,但同样,这不是
爬行会出现问题,
索引或排名。如果你想
确保它不会触发
网站站长工具抓取错误,然后我
建议只使用 301 重定向
该 URL 到您的主页(不允许
URL 也会将其显示为
抓取错误 - 它将被列为
robots.txt 不允许的 URL)。

我也建议不明确
禁止抓取 jQuery
文件。虽然我们一般不会
单独索引它,我们可能需要
访问它以生成良好的 Instant
您网站的预览。

总结一下:如果您看到“/a”
在网站管理员的抓取错误中
工具,你可以把它留下来
那,它不会造成任何问题。 如果
你想把它从那里删除,你
可以进行 301 重定向到您的
主页。

干杯

约翰

请参阅此答案以获取更多信息:

https://stackoverflow.com/a/6587142/594235

jQuery is the root source of the code being picked up by the Googlebot. Within the jQuery file itself is this line...

<a href='/a' style='color:red;float:left;opacity:.55;'>a</a>

As per Google (see below), add a 301 redirect to the htaccess file to kill this problem for good.

Redirect 301  /a  http://www.mySite.com

The following is a response from Google employee JohnMu on this issue in the thread I started at Google Groups.

JohnMu

Google Employee

4:39 AM

Hi guys

Just a short note on this -- yes, we
are picking up the "/a" link for many
sites from jQuery JavaScript. However,
that generally isn't a problem, if we
see "/a" as being a 404, then that's
fine for us.
As with other 404-URLs,
we'll list it as a crawl error in
Webmaster Tools, but again, that's not
going to be a problem for crawling,
indexing, or ranking. If you want to
make sure that it doesn't trigger a
crawl error in Webmaster Tools, then I
would recommend just 301 redirecting
that URL to your homepage (disallowing
the URL will also bring it up as a
crawl error - it will be listed as a
URL disallowed by robots.txt).

I would also recommend not explicitly
disallowing crawling of the jQuery
file. While we generally wouldn't
index it on its own, we may need to
access it to generate good Instant
Previews for your site.

So to sum it up: If you're seeing "/a"
in the crawl errors in Webmaster
Tools, you can just leave it like
that, it won't cause any problems. If
you want to have it removed there, you
can do a 301 redirect to your
homepage.

Cheers

John

See this SO answer for even more information:

https://stackoverflow.com/a/6587142/594235

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文