0

I have the two files, htaccess and htpasswd. Within my sub domain I have client directories which need to have a different password for each. This is fine and I have it working when you go to each directory manually or when linked from a different domain.

My problem occurs when I create a client page in the same sub domain (but in the directory above) which links to each of the password protected directories. When I load this client page which has links to all directories it pops up and asks for each password before I've even clicked the link to go to that particular directory.

How do I stop this? or can somebody explain why I cannot or how I might achieve my desired effect.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • When you say it links to the password protected directories, is it just a link that you need to click? Or are you calling them, which could be causing them to be running on load? How are you linking it? – Joe May 15 '17 at 15:09
  • Hi thickguru. Thanks for taking an interest in my issue. I'm just using standard and tags to link from the client page to each clients "home page" – Chris Spencer May 15 '17 at 15:30
  • 1
    maybe some html-included content like a script, image or favicon has a path to that protected directory. – Deadooshka May 15 '17 at 15:37
  • Exactly my thinking @Deadooshka. Chris, the images that you're loading into the page, are they taking from the folder that requires the password? – Joe May 15 '17 at 16:07
  • They might well be...and that would make perfect sense. I'll replace all images with text so that nothing is being pulled from the passwored directory and give it another go! – Chris Spencer May 15 '17 at 16:28
  • Hi, Just wanted to thank Deadooshka and thinkhuru for pointing the obvious. That was indeed the problem and i'd stupidly been thinking there must have been a more complicated reason. duplicated all images I need to the directory above and it's all working as intended. Thanks again! – Chris Spencer May 16 '17 at 07:52

0 Answers0