网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > 服务器环境搭建
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。

Reply
 
Thread Tools Display Modes
  #1   IP: 180.125.23.93
Old 2016-04-12, 10:51 PM
Indiahoma Indiahoma is offline
初级会员
 
Join Date: 2012-07-21
Posts: 1
Indiahoma 现在声名狼藉
Default hostgator 怎么通过CP面板自定义错误页?

加下面的代码到你的public_html目录下的.htaccess文件。

ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml

你可能不希望访客访问到你的错误页,显然,浏览到错误页很让人不爽,那么你可以设置一下,当要访问错误页的时候自动跳转到首页,你可以把代码改成下面这样:

ErrorDocument 404 /index.html

如果浏览器不显示你自定义的错误页,可能是因为它们要求所显示的页面必须要大于 1KB 吧!

主要的错误页有以下这些,大家可以多了解一下:

Client Request Errors
400 – Bad Request
401 – Authorization Required
403 – Forbidden
404 – Not Found
405 – Method Not Allowed
406 – Not Acceptable (encoding)
407 – Proxy Authentication Required
408 – Request Timed Out
409 – Conflicting Request
410 – Gone
411 – Content Length Required
412 – Precondition Failed
413 – Request Entity Too Long
414 – Request URI Too Long
415 – Unsupported Media Type

Server Errors
500 – Internal Server Error
501 – Not Implemented
502 – Bad Gateway
503 – Service Unavailable
504 – Gateway Timeout
505 – HTTP Version Not Supported

如果你想要恢复系统默认的错误页,也很简单,只需要删除 public_html 目录下的错误页面就可以了。比如:

404.shtml
403.shtml
500.shtml
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 03:47 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.