404错误 找不到对象_如何修复404找不到错误

404错误 找不到对象

404错误 找不到对象

A 404 error occurs when you try to visit a web page that doesn’t exist. Sometimes, the problem is on the website itself, and there’s not much you can do about that. But sometimes, the problem is one you might be able to solve—maybe you typed the address wrong, or maybe your browser cache is causing problems. Here are some solutions you can try.

当您尝试访问不存在的网页时,发生404错误。 有时,问题出在网站本身上,您对此无能为力。 但是有时,问题可能是您可以解决的-也许您输入的地址错误,或者浏览器缓存导致了问题。 您可以尝试以下解决方案。

什么是404错误? (What Is a 404 Error?)

Like we mentioned, you get a 404 error when the web page you’re trying to get to doesn’t exist. It’s called a 404 error because that’s the HTTP status code that the web server uses to describe that kind of error. Different websites might show you different kinds of custom pages when you get this error. Above, you can see Google’s 404 error page, and the top of this article, you can see How-To Geek’s own custom error page. Some 404 error pages might even provide you with suggestions for finding what you’re looking for or ways to navigate to other parts of the site.

就像我们提到的,当您要访问的网页不存在时,您会收到404错误。 之所以称为404错误,是因为这是Web服务器用来描述此类错误的HTTP状态代码。 出现此错误时,不同的网站可能会向您显示不同类型的自定义页面。 在上面,您可以看到Google的404错误页面,在本文的顶部,您可以看到How-To Geek自己的自定义错误页面。 某些404错误页面甚至可能为您提供寻找所需内容的建议,或导航至网站其他部分的方式。

Websites might also use slightly different names for this error. For example, you might see things like:

网站可能还会对此错误使用稍微不同的名称。 例如,您可能会看到以下内容:

  • 404

    404
  • 404 Resource not found

    404找不到资源
  • Error 404

    错误404
  • HTTP 404

    HTTP 404
  • 404 Not Found

    找不到404
  • Error 404 Not Found

    未找到错误404
  • 404 Page Not Found

    404页面不存在
  • 404 File or Directory Not Found

    找不到404文件或目录

They all mean the same thing.

他们都是同一件事。

So, let’s take a look at some things you can do to try to fix a 404 error on your end.

因此,让我们看一下您可以尝试解决的404错误的方法。

刷新页面 (Refresh the Page)

It doesn’t happen often, but sometimes web servers can glitch and simply fail to show a page that really does exist. The first thing you should try is refreshing the page. Most browsers use the F5 key to refresh, and also provide a Refresh button somewhere on the address bar. It doesn’t fix the problem very often, but it takes just a second to try.

这种情况并不经常发生,但是有时Web服务器可能会出现故障,并且根本无法显示确实存在的页面。 您应该尝试的第一件事是刷新页面。 大多数浏览器使用F5键刷新,并在地址栏上的某个位置提供“刷新”按钮。 它不会经常解决问题,但是只需一秒钟即可尝试。

仔细检查地址 (Double Check the Address)

If you typed a URL into your address box yourself, it’s possible you mistyped. If you clicked a link on another web page and were shown a 404 error, it’s also possible that the link was mistyped on the linking page. Check the address and see if you spot any obvious errors, like in the image below.

如果您自己在地址栏中输入了URL,则可能输入错误。 如果单击另一个网页上的链接并显示404错误,则也有可能在链接页面上键入了错误的链接。 检查地址,看是否发现明显的错误,如下图所示。

In that example above, you can try changing “watht” to “watch” and seeing if you reach the correct page.

在上面的示例中,您可以尝试将“ watht”更改为“ watch”,然后查看是否到达正确的页面。

执行搜索 (Perform a Search)

If the URL you are trying to reach is descriptive (or if you know roughly the name of the article or page you were expecting), you can use the keywords in the address to search the website. In the example below, you can’t really tell from the URL itself if anything is mistyped, but you can see some words from the name of the article.

如果您尝试访问的URL是描述性的(或者您大致了解所期望的文章或页面的名称),则可以使用地址中的关键字搜索网站。 在下面的示例中,您无法真正从URL本身判断出是否输错了任何内容,但是可以从文章名称中看到一些单词。

Armed with that knowledge, you can perform a search on the website with the relevant keywords.

有了这些知识,您就可以使用相关的关键字在网站上进行搜索。

That should lead you to the correct page.

那应该引导您到正确的页面。

finding-the-correct-url

The same solution also works if the website you are trying to reach changed the URL for some reason and did not redirect the old address to the new one.

如果您尝试访问的网站由于某种原因更改了URL并且未将旧地址重定向到新地址,则相同的解决方案也可以使用。

And if the website you’re on doesn’t have it’s own search box, you can always use Google (or whatever search engine you prefer). Just use the “site:” operator to search only the website in question for the keywords.

而且,如果您所在的网站没有它自己的搜索框,则可以随时使用Google(或您喜欢的任何搜索引擎)。 只需使用“ site:”运算符即可仅在相关网站中搜索关键字。

In the image below, we’re using Google and the search phrase “site:howtogeek.com focal length” to search just the howtogeek.com site for the keywords.

在下图中,我们使用Google和搜索词组“ site:howtogeek.com焦距”来仅搜索howtogeek.com网站中的关键字。

using-google-search-operator

清除浏览器缓存 (Clear Your Browser Cache)

It’s also possible the page with the error has been cached in your browser, but the actual link was changed on the website. To test out this possibility, you’ll have to clear your browser cache. Clearing the cache won’t affect your browsing experience much, but some websites may a take a couple of extra seconds to load as they re-download all the previously cached data.

错误页面也可能已缓存在您的浏览器中,但实际链接已在网站上更改。 为了测试这种可能性,您必须清除浏览器缓存。 清除缓存不会对您的浏览体验造成太大影响,但是某些网站在重新下载所有先前缓存的数据时可能会花费额外的几秒钟时间。

To clear the cache in your browser, you can follow this extensive guide which will teach you how to clear your cache on all the popular desktop and mobile browsers.

要清除浏览器中的缓存,您可以按照这份详尽的指南进行操作该指南将教您如何清除所有流行的台式机和移动浏览器上的缓存。

更改您的DNS服务器 (Change your DNS Server)

If a website is giving you 404 error on multiple URLs while being accessible on other networks (like mobile), then it’s possible that your ISP has blocked access to that website, or that their DNS servers are not working properly. To work around that, you can change your DNS servers and try to access the website.

如果某个网站在多个URL上给您404错误,而在其他网络(如移动设备)上却可以访问,则可能是您的ISP阻止了对该网站的访问,或者它们的DNS服务器无法正常工作。 要解决此问题,您可以更改DNS服务器并尝试访问该网站。

You can also try to flush your DNS instead of changing your DNS server to resolve the error. Flushing deletes the DNS cache which then forces a new DNS lookup. If the website or page in question was recently moved to another IP address, then flushing the DNS should resolve the 404 error. Here is how to clear your DNS cache on Google Chrome and do the same on macOS.

您也可以尝试刷新DNS,而不用更改DNS服务器来解决该错误。 刷新会删除DNS缓存,然后强制执行新的DNS查找。 如果有问题的网站或页面最近被移到了另一个IP地址,则刷新DNS应该可以解决404错误。 这是在Google Chrome上清除DNS缓存在macOS上执行相同操作的方法

检查网站是否存在临时问题 (Check if the Website Has Temporary Issues)

Sometimes a website may experience issues temporarily which might cause 404 errors. In that case, there is nothing you can do but wait. But to confirm, you can test the website on an availability testing tool. There are many tools out there, and you can just do a web search for “is website down” to see a list of tools. Just make sure to replace “website” with the name of the site you want to test.

有时,网站可能会暂时遇到问题,可能会导致404错误。 在这种情况下,您只能等待。 但是要确认,您可以使用可用性测试工具来测试网站。 那里有很多工具,您可以在网络上搜索“网站是否关闭”以查看工具列表。 只需确保将“ website ”替换为您要测试的站点的名称即可。

联系网站 (Contact the Website)

If all else fails, then your last option is to contact the website owner directly. Look up their contact information on the website and contact them about the page in question. It’s likely that the page you’re looking for was moved or deleted, and the owner can clarify why it was done. If there is no contact form, you can try and reach the website on their social media.

如果所有其他方法均失败,那么您的最后选择是直接与网站所有者联系。 在网站上查找他们的联系信息,并就有关页面与他们联系。 您要查找的页面很可能已被移动或删除,所有者可以明确说明其原因。 如果没有联系表,您可以尝试在其社交媒体上访问该网站。

翻译自: https://www.howtogeek.com/353486/how-to-fix-a-404-not-found-error/

404错误 找不到对象

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值