0

I have a site that has the main path under password protection. I also have a subfolder that have a separate (htaccess/htpasswd) password protection.

For some reason, when I access the subfolder, I'm asked to put in my id/password twice. All of the files that are referenced are under the subfolder.

What should I be doing to troubleshoot this? I've tried this on different browsers and it's the same behavior.

There is one main html page with a .swf (the only thing on the page)...it loads other assets but they are within the same subfolder.

milesmeow
  • 3,688
  • 5
  • 35
  • 58

2 Answers2

2

If you're loading an XML file or something from the SWF off of a different domain, that could cause it. I can't check, but it might even happen if the SWF loads on HTTP, and the XML is on HTTPS or something like that.

justin
  • 1,147
  • 1
  • 8
  • 17
  • Ah OK. I'll check the HTTP, HTTPS in URLs. – milesmeow Dec 02 '09 at 17:40
  • Beware: www.example.com and example.com are not the same domain. – Residuum Dec 02 '09 at 17:51
  • There's a redirect to HTTPS. I think the XML is being loaded by the .swf from an HTTP URL (I can't verify it...it might be using relative URLs...I think there's Javascript in there that does this) When I put in HTTP://domain.com, I'm asked twice. (so in this case the XML wants to load relative to HTTP, but is redirected to HTTPS) When I put in HTTPS://domain.com, I'm only asked once. (Here the XML is loaded relative to HTTPS) – milesmeow Dec 05 '09 at 03:51
1

If you've created a rewrite directive...

You're asked for Username/Password when "yoursite.com" is requested. Then, the URL is automatically rewritten according to .htaccess file, a second request is made for "www.yoursite.com", and you're asked for a Username/Password again. If you type the URL in your browser's address bar the way your .htaccess rewrites addresses, then you will only be prompted for your Username/Password once.

In summary, if your .htaccess file rewrites "yoursite.com" as "www.yoursite.com", when you request "yoursite.com" you will be prompted for your Username/Password twice; once for "yoursite.com" and a second time for "www.yoursite.com". When you request "www.yoursite.com", you will be prompted for your Username/Password once.

Beau M.
  • 11
  • 1