Hi james, thank you... I did some further searches here after I first posted, and finally figured out that basic sequence.
But here are some things i observed, and if possible i would like your comments on, so i can understand what is happening. My objective:
I am working with some local musicians who are wanting to provide mp3s of their songs to people who have a username and password, on a song-by-song basis.
Not being a webmaster or web developer, but knowing some basic principles, I figured it might be easy to essentially create a password protected folder (directory) for each mp3 song, have unique password for each,... and then when someone comes to
www.website.com/1 or
www.website.com/2 or
www.website.com/3, user gets challenged for a username and password.. then upon submitting, they would have that dircetory contents revealed. And there would be the mp3 file listed as its songname.mp3 in that folder directory.
PROBLEM 1: Even before attempting to add password protection to a folder which contained an mp3 file, I wanted to test that I uploaded properly. But I found that when I arrived at
www.website.com/1 --- I got a 403 Forbidden error message. (again, with no password applied to directory).
Is this something related to Plesk? because with a prior hosting account which used a different brand control panel, when I would arrive at an address like
www.website.com/1 , and assuming I had no index.htm page there, I would see the file directory exposed. Which sometimes is a desired thing.
PROBLEM 2:
1. Before I asked here about password protection, I had already created directories named as follows:
/1
/2
/3
and I had uploaded an mp3 file, songname.mp3 to folder/directory /1 ... such that it was located at the address:
www.website/com/1/songname.mp3
THAT worked fine and the file played.
So then I clicked "Directories" in Plesk, and attempted to make folder 1 password-protected. Long story short, this did not work, and I must have been creating a 2nd directory somewhere else....not sure. But in the box I entered
/1
and then "Add user" ... and specified a username and and password. I'd quit the browser, then go to that address:
www.website/com/1/songname.mp3
and I'd hit the username/password challenge box, i'd type the username and password, submit, but the challenge box would come up again, and I could never get into that directory or file.
So I tried to create a new "protected directory" from scratch called /test . I created a username and password, then used the file manager to copy the mp3 file from the /1 directory to the /test directory .
Now I quit the browser again, went to the address
www.website/com/test/songname.mp3 , got the challenge, entered the useranem and password, then (ON A MAC, using Firefox), the MP3 began playing as a quicktime file embedded on the page. I assume i had the quicktime app assigned to the .mp3 file format?
I wanted to have the song download vs play.
ITEM 3 - RELATED:
My preference would be to not have to create index pages for each song directory, but rather to have the file simply listed there as songname.mp3 so it could be clicked for downloading.
So how can I make it such that when I go to the location:
www.website/com/test
the contents of that directory display (after I enter the username and password) -- vs having it give me the 403 Forbidden message?
--
hope this makes sense. thank you