Does anyone have the coding handy to redirect a surfer to a different page if they dont enter a correct username + password in to a .htaccess password box?

Im trying to setup a basic 404 page for it cant figure out the correct code

Regards,

Lee