How do I kill the authentication pop-up window after htaccess failure?


I have a "members" section of  our website that is protected using an .htaccess file.  If the user authentication fails, the user is redirected to the standard 401 error. However, for reasons I don't understand, once on this page, the user continues to receive the authentication pop-up window... over and over and over and over.

You can see what happens if you try a failed login. Go to, and try logging in from the home page.

The 401 error page is obviously located outside the protected members area.

Does anyone know why this is happening, and how I can fix it?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think it is a problem in your javascript  file global/code/header_preload.js which is called from you document which is called in case of 401 error. (you have 10 images defined and I just calculated it called 10 times login box)
their URL is given as menu10_over = newImage("images/header/menu10-over.gif");
But during login URL is http://site/member/....
It means that URL for image will be http://site/member/image  and that URL is protected by authentication.
So change your script. Put leading slash in newImage call:
menu10_over = newImage("/images/header/menu10-over.gif");


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
darkylaAuthor Commented:
LOL... I had no idea.  Thanks.  That seems to have more or less done the job.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.