View Full Version : Intercepting called prompt request (.htacess/.htpassword)

08-31-2002, 05:18 AM

I'm using .htaccess/.htpassword to protect files and directories on my site. So, if you click on a link to a protected directory, you will get a password prompt. However, if someone who is not a client is just being curious, a common occurence, and clicks on the link then cancels the password prompt, they end up looking at an ugly "Authorization Required" page that does not match the design of my site.

So, I'd like to customize this page. However, my host's tech support told me that they do not offer this ability. However, they suggested, without telling me how, that I could intercept the cancelled prompt with Javascript, and supply my own custom page, I suppose.

Anyway, does anyone know how to do this: Intercept a cancelled .htacess/.htpassword prompt???


He is risen!!!

08-31-2002, 05:44 AM
to the best of my knowledge ( admittedly limited in certain areas ), that's more than impossible, thats superbly impossible.

moreover, even if it were possible, you'd still have to customize the 403 page, in order to put the javascript on it.

the moral: don't trust tech support.

i'd ask if you're allowed to implement the custom error pages yourself. it's not that hard, especially if you've read Feyd's tutorial:

08-31-2002, 07:04 AM
Hi Joh6nn:

Thanks for the handing reference link. Unfortunately, I don't have permission to change the .htaccess file, or to change the permissions, so I guess I'm stuck with the default page.

I appreciate your help though.

He is risen!!!