【问题标题】:000webhost.com Custom Error page does not work?000webhost.com 自定义错误页面不起作用?
【发布时间】:2014-03-12 10:20:16
【问题描述】:
当我更改代码并添加新内容时,它甚至无法加载我的正常页面。如果删除ErrorDocument 404/error.php(和其他)我可以正常进入我的网站。
这是我的网站域:carnageband.tk
代码如下:
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
我应该怎么做才能绕过它重定向我的页面? LINK
【问题讨论】:
标签:
php
html
.htaccess
error-handling
【解决方案1】:
我刚刚遇到了同样的问题,问题似乎来自 .htacess 文件。删除 .htaccess 文件后,网页会再次正常加载。
我能够通过从 cPanel 文件管理器编辑 .htaccess 文件来修复它,而不是通过 FTP 传输文件,但我不确定为什么它以前不起作用。
我的代码和你的很像:
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
ErrorDocument 403 /errors.php?p=403
ErrorDocument 404 /errors.php?p=404
ErrorDocument 500 /errors.php?p=500