问题描述
我创建了一个401页,这是HTML,并在一个访问的目录。
I created a 401 page, which is html, and within an accessible directory.
它显示在IE 6中,火狐,Safari浏览器,而不是IE 7。
It displays in IE 6, Firefox, Safari, but not IE 7.
下面是.htaccess文件上的目录和位置401页设置身份验证。
Here is the .htaccess file for setting the authentication on the directory and location for the 401 page.
KrbServiceName HTTP
KrbMethodNegotiate On
KrbMethodK5Passwd On
#KrbVerifyKDC on
KrbSaveCredentials off
KrbAuthRealms HCCC.CAMPUS
Krb5KeyTab /etc/httpd/keytab
KrbAuthoritative off
AuthType Kerberos
AuthName "Please Login"
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL "ldap://domain:389/OU=Campus Users,DC=hccc,DC=campus?userPrincipalName?sub?(objectClass=*)"
AuthLDAPBindDN "CN=ldapuser,CN=Users,DC=hccc,DC=campus"
AuthLDAPBindPassword ldapsearch
require ldap-group CN=Students,CN=Users,DC=hccc,DC=campus
#require ldap-group CN=Faculty,CN=Users,DC=domain,DC=local
#Satisfy any
ErrorDocument 401 /all/401.html
当我去到目录/页,它会提示我输入用户名/密码,因为我的帐户不是学生组中,它踢我到401页,其中它在Safari浏览器,IE6,Firefox的,但IE7它不,它只是显示的默认页面(屏幕截图在这里: http://i35.tinypic.com /2qbgmjs.png )
When I go to the directory/page, it prompts me for a username/password, since my account is not within the Students group, it kicks me to the 401 page, which it does in Safari, IE6, Firefox, but IE7 it does not, it just shows the default page (screen shot here: http://i35.tinypic.com/2qbgmjs.png)
任何帮助是极大的AP preciated。
Any help is greatly appreciated.
推荐答案
您的错误页面已经被超过一定尺寸 表现出来,否则就显示出其内部的错误页面。
Your error page has to be over a certain size to show it, otherwise it shows its internal error page.
微软的Internet Explorer有一种莫名的功能:如果一个Web服务器发送一个自定义错误页,其尺寸小于512字节,Internet Explorer中显示出其自身的内部错误页面,而不是从服务器之一。 微软称此为友好HTTP错误信息。
您可以在Web浏览器中打开这个功能关闭(在网上搜索显示友好HTTP错误信息怎么看),但你可能希望确保其他人没有遇到它。为了做到这一点,只要确保你的自定义错误页大于512字节大小(包括HTML标签等)更大。如果需要,可以使用看不见的HTML注释文本。
You can turn this "feature" off in your Web browser (search the Web for "Show friendly HTTP error messages" to see how), but you probably want to make sure that other people don't encounter it. To do that, just make sure your custom error pages are larger than 512 bytes in size (including the HTML tags and so forth). You can use invisible HTML comment text if necessary.
在实践中,大多数自定义错误页将超过512字节反正较长,所以这通常不是一个问题。我们的客户通常使用很短的测试短语,在这种情况下,它可以是非常令人费解的时候只遇到的问题。
In practice, most custom error pages will be longer than 512 bytes anyway, so this isn't usually a problem. Our customers usually only encounter the problem when using a very short test phrase, in which case it can be very puzzling.
这篇关于IE 7没有显示我的自定义401页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!