创建和实现404页面 [英] Creating and Implementing a 404 Page

查看:70
本文介绍了创建和实现404页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写并安装个性化的404错误页。怎么

我这样做?


我的网站上有200多个HTML文件。我很担心,如果我更改或移动文件,我可能无法检测到链接到它的所有其他文件

因此需要更改。个性化的404

错误页面会通知我的网站访问者他们如何帮助我

纠正这些错误。


-


David E. Ross

< http://www.rossde.com/>


我使用Mozilla作为我的Web浏览器,因为我想要一个符合Web标准的浏览器

。请参阅< http://www.mozilla.org/>。

I want to write and install a personalized "404 Error" page. How
do I do that?

I have over 200 HTML files on my Web site. I''m concerned that, if
I change or move a file, I might not detect all the other files
that link to it and thus require changes. A personalized "404
Error" page would inform visitors to my site how they can help me
correct such errors when they exist.

--

David E. Ross
<http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <http://www.mozilla.org/>.

推荐答案

David Ross写道:
David Ross wrote:
I想要编写并安装个性化的404错误页。我是怎么做到的?


像任何其他html文档一样编写页面。至于如何设置它,这取决于服务器和配置。如果它是Apache的b $ b,你可以添加到配置文件(例如,.htaccess用于每个

目录配置)以下行:


ErrorDocument 404 /error404.html


更改文件名和路径以指向您的文档。

我有200多个HTML我网站上的文件。我担心,如果我更改或移动文件,我可能无法检测到链接到它的所有其他文件,因此需要更改。个性化的404
错误页面会通知我的网站访问者如何帮助我
纠正这些错误。
I want to write and install a personalized "404 Error" page. How
do I do that?
Write the page as you would any other html document. As for how to
set it up, that depends on the server and configuration. If it''s
Apache, you can add to the config file (e.g., .htaccess for a per
directory configuration) the following line:

ErrorDocument 404 /error404.html

Change the file name and path to point to your document.
I have over 200 HTML files on my Web site. I''m concerned that, if
I change or move a file, I might not detect all the other files
that link to it and thus require changes. A personalized "404
Error" page would inform visitors to my site how they can help me
correct such errors when they exist.




你不应该依赖访问者来检测丢失的文件。使用

链接检查器。

http ://validator.w3.org/checklink


-

Brian

按照我的说明操作给我发电子邮件



You shouldn''t have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink

--
Brian
follow the directions in my address to email me


Brian写道:

David Ross写道:

David Ross wrote:
我想编写并安装个性化的404错误。页。我是如何做到的?
I want to write and install a personalized "404 Error" page. How
do I do that?



像编写任何其他HTML文档一样编写页面。至于如何设置它,这取决于服务器和配置。如果它是Apache,你可以添加到配置文件(例如,.htaccess用于每个
目录配置)以下行:

ErrorDocument 404 / error404。 html

更改文件名和路径以指向您的文档。



Write the page as you would any other html document. As for how to
set it up, that depends on the server and configuration. If it''s
Apache, you can add to the config file (e.g., .htaccess for a per
directory configuration) the following line:

ErrorDocument 404 /error404.html

Change the file name and path to point to your document.




谢谢。我做到了,它就像一个魅力。 (是的,我的ISP

使用Apache。)



Thank you. I did it, and it works like a charm. (Yes, my ISP
uses Apache.)

我的网站上有200多个HTML文件。我担心,如果我更改或移动文件,我可能无法检测到链接到它的所有其他文件,因此需要更改。个性化的404
错误页面会通知我的网站访问者如何帮助我
纠正这些错误。
I have over 200 HTML files on my Web site. I''m concerned that, if
I change or move a file, I might not detect all the other files
that link to it and thus require changes. A personalized "404
Error" page would inform visitors to my site how they can help me
correct such errors when they exist.



你不必依赖访问者来检测丢失的文件。使用
链接检查器。

http:// validator .w3.org / checklink




我为checklink添加了书签。页。我很快就会尝试。


-


David E. Ross

< http:// www.rossde.com/>


我使用Mozilla作为我的Web浏览器,因为我想要一个符合Web标准的浏览器

。参见< http://www.mozilla.org/>。



I bookmarked the "checklink" page. I will try that soon.

--

David E. Ross
<http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <http://www.mozilla.org/>.




" Brian" <我们***** @ julietremblay.com.invalid-除去-这部分>写在

消息新闻:9uRBb.359323

"Brian" <us*****@julietremblay.com.invalid-remove-this-part> wrote in
message news:9uRBb.359323


这篇关于创建和实现404页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆