打开网页遇到404 not found
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/c4010d8b357c4f43aa267586359474ac~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728207673&x-signature=abaPRUeJmVa5lx9%2BD72lBSeTmrc%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">404 not found是什么意思?</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">当用户输入一个链接时,服务器上的IIS(Internet信息服务)会<span style="color: black;">首要</span>检测用户输入的<span style="color: black;">位置</span>链接<span style="color: black;">是不是</span>有对应的网页信息,<span style="color: black;">倘若</span><span style="color: black;">无</span>对应的网页信息,<span style="color: black;">此时</span>IIS就会<span style="color: black;">经过</span>服务器向终端用户发送404错误代码页提示,告诉用户找不到与该<span style="color: black;">位置</span>链接对应的网页信息。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">为何</span>会<span style="color: black;">显现</span>404 not found?</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">第1</span>种:用户输入的<span style="color: black;">位置</span>链接有误,<span style="color: black;">引起</span>IIS提示404 not found。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">第二种:服务器上本该有的页面<span style="color: black;">已然</span>被删除了。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">第三种:DNS设置阻止,国外有<span style="color: black;">有些</span>被禁网站在中国浏览<span style="color: black;">一样</span>会<span style="color: black;">显现</span>404 not found的现象。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">从专业的<span style="color: black;">方向</span>来讲<span style="color: black;">导致</span>的<span style="color: black;">原由</span>有三种<span style="color: black;">状况</span>:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1、<span style="color: black;">没法</span>在所请求的端口上<span style="color: black;">拜访</span>Web站点。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2、Web服务扩展锁定策略阻止本请求。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3、MIME映射策略阻止本请求。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">404 not found的<span style="color: black;">处理</span><span style="color: black;">办法</span>介绍:</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上网后,在浏览这些站点时遇到<span style="color: black;">各样</span><span style="color: black;">区别</span>的连接错误。最<span style="color: black;">平常</span>的404 NOT FOUND错误信息<span style="color: black;">重点</span>是<span style="color: black;">由于</span>IE<span style="color: black;">不可</span>找到你所<span style="color: black;">需求</span>的网页文件。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1.<span style="color: black;">针对</span>存在的网页内容<span style="color: black;">因为</span>路径改变而<span style="color: black;">引起</span><span style="color: black;">拜访</span>不了时,可在IIS 中定义404错误指向一个动态页面,在页面里面<span style="color: black;">运用</span>301永久重定向<span style="color: black;">转</span>到新的<span style="color: black;">位置</span>,此时服务器返回301状态码。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2.设置404指向一个设计好的html 文件,此时页面返回的404状态码。<span style="color: black;">此刻</span>的idc<span style="color: black;">供给</span>商基本都<span style="color: black;">供给</span>404设置的功能,直接上传文件设置<span style="color: black;">就可</span>。在IIs中设置<span style="color: black;">办法</span>:打开IIS管理器-->点击要设置自定义404的网站的属性-->点击自定义错误选项-->选中404页-->选中并打开编辑属性-->设置成 URL --> URL 填写“/err404.html”-->按确定退出再把做好的err404.html 页面上传到网站根目录下。此处在“<span style="color: black;">信息</span>类型”中<span style="color: black;">必定</span>要<span style="color: black;">选取</span>“文件”或“默认值”,而不要<span style="color: black;">选取</span>“URL”,<span style="color: black;">否则</span>,将<span style="color: black;">引起</span>返回“200”状态码。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3.404指向一个动态页面,<span style="color: black;">例如</span>error.asp,<span style="color: black;">倘若</span>不在页面里面进行设置,仅仅是返回提示的HTML 代码,将<span style="color: black;">引起</span>页面返回200 状态码,这是不正确的,<span style="color: black;">咱们</span><span style="color: black;">能够</span>在<span style="color: black;">表示</span>完提示内容后,<span style="color: black;">增多</span>语句:Response.Status="404 Not Found" ,<span style="color: black;">这般</span>就<span style="color: black;">保准</span>页面返回404状态码。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">4.Apache下设置404错误页面。在.htaccess 文件中加入ErrorDocument 404 /notfound.php 编辑本段</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">404 not found是为了提示用户页面<span style="color: black;">没法</span>被<span style="color: black;">拜访</span>。</span></p>
你的留言真是温暖如春,让我感受到了无尽的支持与鼓励。 感谢楼主的分享!我学到了很多。
页:
[1]