views:

339

answers:

1

I created a 401 page, which is html, and within an accessible directory.

It displays in IE 6, Firefox, Safari, but not IE 7.

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

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)

Any help is greatly appreciated.

+6  A: 

Your error page has to be over a certain size to show it, otherwise it shows its internal error page.

A note about Internet Explorer and "friendly error messages"

Microsoft Internet Explorer has an inexplicable "feature": if a Web server sends a custom error page that is shorter than 512 bytes in size, Internet Explorer shows its own internal error page instead of the one from the server. Microsoft calls this "friendly HTTP error messages".

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.

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.

voyager