Safari 浏览器不会显示错误 401 页面

发布于 2024-07-23 11:30:46 字数 303 浏览 4 评论 0原文

我正在使用 Apache 2,并且在 httpd.conf 中有一个自定义 401 页面。

ErrorDocument 401 /error/unauthorized.html

当我访问受保护的资源时,所有浏览器都会显示基本的 http 身份验证对话框。 如果我单击“取消”,除 Safari(v3 和 v4)之外的所有浏览器都将显示自定义 401 页面。 Safari 只显示当前页面。

有没有办法让 Safari 通过 Apache 配置和/或 mod_perl 处理程序显示 401 页面?

I'm using Apache 2 and have a custom 401 page, in httpd.conf

ErrorDocument 401 /error/unauthorized.html

When I access a protected resource, all browsers show the basic http authentication dialog. If I click "cancel", all browsers but Safari (v3 and v4) will display the custom 401 page. Safari just displays the current page.

Is there any way to get Safari to display the 401 page through Apache configuration and/or mod_perl handlers?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

内心激荡 2024-07-30 11:30:47

您好,

我相信这是 Safari 浏览器的一个众所周知的问题。 事实上,HTTP 身份验证的几个方面都受到“特殊”Apple 实现的影响。

抱歉,我无法为您提供快速解决方法。

干杯,

G'day,

I believe that this is a well known issue for Safari browsers. In fact, several aspects of HTTP Authentication are subject to a "special" Apple implementation.

Sorry I can't give you a quick workaround.

cheers,

甜扑 2024-07-30 11:30:47

我无法在 Safari 4 Beta 中重现该错误,但请尝试在您的 unauthorized.html 文件中添加一些字节。 某些版本的 IE 不会显示自定义错误页面,除非页面超过一定大小,它假定小页面是默认的无用页面,并尝试显示更有用的内容(也称为令人困惑)。

I can't reproduce the error in Safari 4 Beta, but try adding some bytes in your unauthorized.html file. Some versions of IE wouldn't show custom error pages unless the page was over a certain size, it assumed small pages were the default non-useful pages and tried to show something more useful (aka confusing).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文