I have this in my .htaccess file:

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

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.


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

ErrorDocument 401 /error.php
| improve this answer | |

Your Answer

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