3

I have this in my .htaccess file:

    <FilesMatch "(contracts|concepts)$">
    AuthName "Contracts"
    AuthType Basic
    AuthUserFile /is/htdocs/wp54963193_ZBG2Q9J2R8/www/.htpasswd
    Require valid-user
</FilesMatch>

This is fairly basic and works fine for me. However, when a user enters a wrong password he is being taken to a 401 error page. The same if he refuses to enter a password and simply clicks "Cancel". Clearly this is not very user-friendly at all.

Is there any way to specify a forwarding or error page or something?

Thanks for any help in this matter.

migrated from stackoverflow.com Oct 3 '11 at 13:07

This question came from our site for professional and enthusiast programmers.

5

I guess you should be able to set a custom page for 401 error, just as for other pages:

ErrorDocument 401 /error.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy