LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .htaccess and mp3 (https://www.linuxquestions.org/questions/linux-newbie-8/htaccess-and-mp3-247469/)

uk webs 10-26-2004 09:20 AM

.htaccess and mp3
 
Hi,

Please could someone help me. I am trying to set up a website for bands to upload .mp3 samples of their music. I want this to be protected using .htaccess and then give usernames/passwords to users who need it allowing them to listen to this audio. The audio is uploaded using php upload script.. which works well. There is then another php page to play the music after users log in..

So, I have created a .htaccess file and associated password files. I created a directory called audio and set CHMOD to 777 on the audio directory and put the .htaccesss file in this directory.

I can upload the .mp3 files fine.

The 'play' page is in another directory call 'members' which is set to 711 and is protected by another .htaccess file.

I have a button in the play site which links to the .mp3 file in the audio directory.

So when I go to the 'play' site.. I have to log in.. which works and lets me access the site. I can click the play button to play the audio, which opens windows media player...

Now here is my problem...

When media player opens another popup window opens asks me enter a network password. If I put in the same username and password, as I use in the 'play' site, and audio directory, the audio plays, but I want to play the mp3 file without re-entering the username and password.. Is there anyway of stopping this network login box? Why doesn't it just authenticate from the original .htaccess login??

With Thanks

looseCannon 10-26-2004 10:09 AM

In the .htaccess what do you have the 'realm' set to. Try setting them to the same thing, that might resolve the problem.

You are putting the password files outside the DocumentRoot(s) for Apache, aren't you?

uk webs 10-26-2004 11:24 AM

Thats the AuthName - am I right? If so they are all set to the same.
The pw file is outside the Apache, thanks

looseCannon 10-26-2004 02:00 PM

My other thought on this was it might have something to do with the structure of things. If you made the directory with the mp3's a subdirectory of where the page is that lists the mp3's (and removed the .htaccess file from the mp3 directory) then this will probably go away.

I'm pretty sure it has to do with the structure of things, unless you already have the mp3 content directory as a subdirectory. If so, then I'm stumped and would have to do some investigation.

uk webs 10-26-2004 05:20 PM

Thanks. At the moment the mp3 directory isn't a sub directory, I will give it a go and move the directory under the play site directory


All times are GMT -5. The time now is 03:10 AM.