问题标签 [errordocument]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
.htaccess - 使用子目录中的 404 ErrorDocument
我在子文件夹中有一个 htaccess 文件,如下所示:
在 htaccess 文件中使用以下代码设置 404 ErrorDocument
问题是加载了根目录中的 404 页面,而不是/subfolder/
文件夹中的页面。我不能简单地将 htaccess 文件更改为使用 /subfolder/404.php,因为系统将安装在许多不同的地方。
有没有办法引用 htaccess 所在目录中的文件?
http - 错误文档和重写 URL
我想为一些 HTTP 错误使用自定义页面,所以我使用 .htaccess 文件。同时我想使用 URL 重写,但这不起作用,我不知道为什么。
这是我的 .htaccess :
apache - 带有变量的 Apache ErrorDocument 外部重定向
在 Apache 中是否可能发生这样的事情...(即重定向到外部 url,其路径导致传递 403 错误)
.htaccess - ErrorDocument 仅当引用者为空时
我想添加我的 .htaccess ErrorDocument 404 /error-404.php (等),但前提是引用者为空。因此,如果用户错误地输入了 URL,则会得到 error-404.php,但是当我在页面中链接图像并且不存在时,会出现默认错误 404。
这样,当用户看不到错误时,我节省了不下载 HTML+CSS+stuff 的带宽。
但我不知道该怎么做:(
先感谢您 :)
apache - No ErrorDocument 500 redirect when using with mod_rewrite
I'm trying to make my own ErrorDocument 500 page while using web.py framework.
The problem is that ErrorDocument directive is not working. I have builtin error message instead of my custom one. And also have "Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request"
If I change
to
it works fine.
Also if I set RewriteEngine off
ErrorDocument redirect works correctly.
Thank you for your suggestions.
.htaccess:
http-status-code-404 - 交响乐数据源错误
创建从我的任何部分中提取的数据源并按“创建数据源”时,出现以下错误:
奇怪的是,如果我从系统中提取或提供自定义 xml,则数据源创建得很好,并且我没有收到之前的消息。在应该满足技术要求的服务器上运行 Symphony 2.3。我之前运行过 Symphony,从未遇到过此类问题。
apache - .htaccess ErrorDocument 问题
自定义错误页面的问题。我的服务器根目录是“C:\www”,错误页面在“C:\www\errors”中。所以我在 "C:\www" 中放了一个 .htaccess 文件,内容如下:
这适用于“mysite.net”中的任何内容。但我也有像“first.mysite.net”、“second.mysite.net”等子目录,并且根目录下的 .htaccess 在那里不起作用。它正在这些子文件夹中搜索“errors”文件夹并返回默认的 404 页面。
我试过这个:
不工作。
这可行,但它会进行重定向,我不想要这个。我希望浏览器保持地址行相同。
谁能帮我说清楚?谢谢。
.htaccess - 找不到页面应该与重写规则 htacces 一起使用
我想将我的 url 从 php 扩展重写为 html。如果找不到该文件,那么它应该重定向到某个客户页面(404.php)。
我写了这样的规则:
使用这个我面临这样的问题。http://somedomain.com/expertLocal/contact.html
它将工作文件因为我有contact.php 页面。如果我会写 somedomain.com/expertLocal/contactxyz.php 然后它会重定向到 404.php 页面但是如果我会在地址栏中写http://somedomain.com/expertLocal/contactxyz.html那么它会给出警告而不是 404 .php 页面。
这是因为我使用了我自己的框架,并且在这个结构文件中首先重定向到控制器索引文件,然后在其中包含请求的文件。
你能帮帮我吗?
提前致谢..
apache - 可以在 Location 指令下指定自定义 HTTP 错误 500 吗?
提前抱歉,我是 HTTP 服务器的新手。
我想从 Oracle HTTP 服务器(OHS,基于 Apache 构建)自定义错误 500。我想这应该从ErrorDocument
指令中完成,但我从未找到任何用于自定义 Webspace 错误的示例,只有文件系统之一(在Directory
或File
指令下)。
更准确地说,这是使用的默认配置的一部分:
如果我理解得很好,RedirectMatch
andLocation
指令用于将 /analytics 之类的 URL 传递给 Weblogic。是否可以在 /analytics 等 URLErrorDocument
下添加Location
自定义错误 500 ?
我天真地尝试过,但无法使其发挥作用。谢谢 !
.htaccess - 需要在 .htaccess 中指定完整的 URL?
我的 .htaccess 文件中有以下行,它可以工作。
当我将其更改为其中任何一个时,它不再起作用(不知道哪个是正确的):
.htaccess 文件和 error.php 位于同一目录中。为什么会这样?
注意:我在 Wampserver
完整的 .HTACCESS 文件