Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Why does .htaccess ask for a second password box with Windows Media Player pages?

Posted on 2002-06-26
Medium Priority
Last Modified: 2010-03-04

     I've run into a peculiar problem. After setting up .htaccess in a directory, and then pointing my browser to it, I get asked for a username and password. All well and good.

     Then, with an index.html page in front of me, this happens:

     - if I click on a link to a page in the same dir, with straight html in the sub page, I don't get asked for a password again. Again, all well and good.

    - However --- if I click on a link to a page in the same dir that has some Windows Media Player code in it, it pops up a second username/password htaccess box. The second box is slightly different, and has what looks like a media graphic icon on it. After plugging in the username/password again, the media file plays.

    So -- why does it demand the login a second time, and how can we edit the apache httpd.conf file, or the .htaccess file to eliminate the second login?


Peter F. Brown (the html/media code snippet is pasted below)


<!-- <OBJECT classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95
height=120 id=MediaPlayer type=application/x-oleobject
standby="Loading Windows Media Player components..."> -->

<OBJECT ID="MediaPlayer" WIDTH=160 HEIGHT=120
  STANDBY="Loading Windows Media Player components..."

<!-- ----------- 2 of 4 change below file name ------------- -->
<PARAM NAME="FileName" VALUE="es_q2.asx">
<PARAM NAME="AutoStart" VALUE="1">
<PARAM NAME="ShowControls" VALUE="0">
<PARAM NAME="ShowStatusBar" VALUE="0">
<PARAM NAME="ShowDisplay" VALUE="0">
<!-- ----------- 3 of 4 change below file name ------------- -->
<embed type="application/x-mplayer2"
width=160 height=120

Question by:peterbrown
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Expert Comment

ID: 7113786

One of the reason why that is happening is due to different host is used in the URL for accessing the page.  For example if you are originally visited the page by, you get the first passwd box, and you will be fine is you move around the site, but if the link for the media is somehow changed to (for example), or, you will (definitely) be prompted for another password box.

Check Apache FAQ,

Might be directly related to your problem.

BAsed on you explanation, the password box has a different "caption" to it.  Most likely, there is a portion of your apache configuration that control access to media files. Check your apache configuration (/usr/local/apache/conf/httpd.conf), for directives like <Files>, and see if there is any ACL is imposed.  

Another place to look for is the .htaccess files itself.  Remember that the AUthentication, and Authorization can be confiured in httpd.conf, or the .htaccess file for each directories.

More information:

What is your OS/Apache version btw?

If on Unix, you might need root access to tweak your httpd.conf.  If your acl is configured at .htaccess files, then any user that has read-write access to the dirs (and the .htaccess file) should be able to modify the file.


Author Comment

ID: 7114449
Hi Samri,

    Thanks... however, I've resolved all those issues, and have already referenced the urls you mention, including the item on CanonicalName = off (which resolved the immediate second box -- however, we still have the box pop up when an html file with media is clicked on).

    There aren't any <Files> directives in the httpd.conf file that are referring to media files. Perhaps there should be -- in a positive sense.

    It would seem that the httpd.conf file is the culprit, but I haven't seen anything that refers to media files in relation to htaccess.

    Still looking for a solution....


LVL 15

Expert Comment

ID: 7115529

Could you try to isolate the problem.  If possible, try to disable authentication on the folder, ie. rename .htaccess to something else (maybe htaccess-saved)., and try to emulate the steps.  You might need to close all browser, and reopen (since the credential are cached for that session).

All I am trying get is, whether the password box will still pops apprear or not.

If it is still, I would suspect that there much be some ACL defined somewhere (maybe the Files, Location, LocationMatch, etc).  Check or any .htaccess files which might be lying around somewhere withing those sub-folders.

By the way, whem you mention the 2nd password box, did you use the same username/password combination to go thru?

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.


Author Comment

ID: 7117638
Dear Samri,

    Yes, we've disabled it (the password box doesn't pop up) and checked sub-folders. And yes, the user/pass combo is the same. We've also checked the 3 .conf files in the httpd.conf directory and haven't found anything strange.

    A consultant friend suggested that Windows Media Player checks the .htaccess files by itself, without registering that the browser has already approved the directory.

    Still looking for a solution :-)

LVL 15

Expert Comment

ID: 7118334

>>A consultant friend suggested that Windows Media Player checks the .htaccess files by itself, without registering that the browser has already approved the directory.

It's kinda strange.

Anyway, if the .htaccess is totally disable how did the WMP could perform user authentication.

Another thing to try is checking you .htaccess for "Satisfy" directive, and try to use "Satisfy any".  This would be as good as "no" authentication since any client from "Allow from" or have valid username/password would be allowed access.  But this is for testing only.

Within your HTML code of Javascript (or any code at all) does it call/load an external code from a different dir (or the same directory) buy by different URL ref (remember, and is different, and will cause re-Authentication) - Just checking.

Other than that I am pretty much stucked myself.

Author Comment

ID: 7118653
Dear Samri,

    Thanks for trying :-)

    Still looking ... anyone else have an idea?



Expert Comment

ID: 7266479
Your consultant friend is right!
I have the same thing on my box..
I logon to the webserver through a browser and click an mp3.
Mediaplayer then pops up a user/pass box as well.
When associating mp3 with winamp the file isn't even run/served and winamp doesn't start.

I have no solution but i thoght i'd let you know.
LVL 15

Expert Comment

ID: 9690986
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:


Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Accepted Solution

Computer101 earned 0 total points
ID: 9735844
PAQed, with points refunded (75)

E-E Admin

Featured Post

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question