【问题标题】:Change 404 Error with .htaccess: Custom 404 error page使用 .htaccess 更改 404 错误:自定义 404 错误页面
【发布时间】:2020-01-14 16:51:56
【问题描述】:

如何使用 .htaccess 更改 404 错误页面。 实际上,我有一个包含重写规则的 htaccess 文件。 简而言之,我想自定义 401、402、403、404 和 405 错误页面。

【问题讨论】:

标签: .htaccess


【解决方案1】:

我的声誉不允许我发表评论,所以我必须回答。

例子:

Options +FollowSymlinks -MultiViews -Indexes
RewriteEngine On

#
# .htaccess content
#

ErrorDocument 403 403.php
ErrorDocument 404 /AnyDir/404.php
ErrorDocument 500 /OtherDir/500.php

【讨论】:

  • 为什么要评论,什么时候可以回答? (+1)
猜你喜欢
  • 2016-04-25
  • 2013-09-16
  • 2018-04-18
  • 1970-01-01
  • 2015-03-18
  • 1970-01-01
  • 1970-01-01
  • 2015-08-01
  • 2011-07-25
相关资源
最近更新 更多