Apache 是否更改htaccess中的默认错误捕获?

Apache 是否更改htaccess中的默认错误捕获?,apache,.htaccess,mod-rewrite,errordocument,Apache,.htaccess,Mod Rewrite,Errordocument,因此,我的问题与本页提出的问题类似 上面的人试图获取一个动态错误页面 然而,我的问题略有不同(尽管可能仍然有相同的答案) 我与一个共享的网络主机谁显示自定义错误页面默认与广告上。我希望错误能够在没有广告的情况下产生真正的错误响应。我是否需要单独执行以下操作: ErrorDocument 404 /404.html 对于每个错误?或者有没有一种方法可以告诉它显示所有错误的正常错误消息 是否存在某种类型的: ErrorDirective JustOutputErrorInsteadOf

因此,我的问题与本页提出的问题类似

上面的人试图获取一个动态错误页面

然而,我的问题略有不同(尽管可能仍然有相同的答案)

我与一个共享的网络主机谁显示自定义错误页面默认与广告上。我希望错误能够在没有广告的情况下产生真正的错误响应。我是否需要单独执行以下操作:

 ErrorDocument 404     /404.html
对于每个错误?或者有没有一种方法可以告诉它显示所有错误的正常错误消息

是否存在某种类型的:

ErrorDirective JustOutputErrorInsteadOfRedirecting

提前感谢。

使用ErrorDocument指令,您还可以在同一页面上显示自定义错误消息

ErrorDocument 404 "Sorry, the page does not exist!"

ErrorDocument 403 "Ohh, you don't have permission to access this page!"


ErrorDocument 410 "Sorry, the page no longer exists"
您还可以使用html标记格式化这些消息

ErrorDocument 404 "<h2>Sorry, the page does not exist!</h2>"

ErrorDocument 403 "<h2 style='color:blue'>Ohh, you don't have permission to access this page!</h2>"


ErrorDocument 410 "<p>Sorry, the page no longer exists</p>"
errordocument404“对不起,该页面不存在!”
ErrorDocument 403“哦,您没有访问此页面的权限!”
ErrorDocument 410“对不起,该页面已不存在


消息将显示在同一页上。

使用ErrorDocument指令,您还可以在同一页上显示自定义错误消息

ErrorDocument 404 "Sorry, the page does not exist!"

ErrorDocument 403 "Ohh, you don't have permission to access this page!"


ErrorDocument 410 "Sorry, the page no longer exists"
您还可以使用html标记格式化这些消息

ErrorDocument 404 "<h2>Sorry, the page does not exist!</h2>"

ErrorDocument 403 "<h2 style='color:blue'>Ohh, you don't have permission to access this page!</h2>"


ErrorDocument 410 "<p>Sorry, the page no longer exists</p>"
errordocument404“对不起,该页面不存在!”
ErrorDocument 403“哦,您没有访问此页面的权限!”
ErrorDocument 410“对不起,该页面已不存在

消息将显示在同一页上

ErrorDocument 404 "Sorry, the page does not exist!"

ErrorDocument 403 "Ohh, you don't have permission to access this page!"


ErrorDocument 410 "Sorry, the page no longer exists"