【问题标题】:htaccess ErrorDocument with Subdomains带有子域的 htaccess ErrorDocument
【发布时间】:2018-06-04 04:36:58
【问题描述】:

所以我最近尝试制作自己的 404 页面。看起来不错,但是经过数小时的搜索如何添加它(没用),我放弃了...如何在具有此结构的每个子域上获得相同的 ErrorDocument

/var/www
  -main site
    -.htaccess
  -subdomain
    -.htaccess
  -error
    -error***.html (*** = which error, 404 etc)
    ...

我尝试在 /var/www 中继承 .htaccess,但它给了我一个错误:

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

我该怎么做?每次尝试要么只是给我“/error/404.html”作为html,要么遇到错误。文档根目录位于 Subdomains 文件夹中,这就是问题所在。并且返回 .htaccess 中的目录不起作用(../error)。

【问题讨论】:

    标签: .htaccess web


    【解决方案1】:

    嗯,好像不行。我现在刚刚在每个目录中链接了一个 error.php,并且 htaccess 链接到它们

    【讨论】:

      猜你喜欢
      • 2021-06-10
      • 2016-10-19
      • 2015-07-12
      • 2014-07-05
      • 2011-05-31
      • 2016-02-16
      • 2018-03-10
      • 2016-10-12
      • 1970-01-01
      相关资源
      最近更新 更多