Forum Moderators: phranque

Message Too Old, No Replies

htaccess Password Protection

         

sneamia

8:18 pm on May 30, 2007 (gmt 0)

10+ Year Member



I'm trying to restrict access to a directory through a password on
my server, but allow direct linking to mp3 files without authentication.

As of now, I have the following snippets of code:
AuthType Basic
AuthName "Access for /backup"
AuthUserFile /etc... /htpasswd
require user whateverusername

Options +Indexes +MultiViews +FollowSymlinks

<Files *.mp3>
Allow From All
</Files>

I don't know what to modify to allow direct access to the mp3 files
without displaying the directory info, but I want the directory to be
available to certain users.

jdMorgan

9:00 pm on May 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See the Satisfy directive in the Apache core directives documention.

Jim

sneamia

11:18 pm on May 30, 2007 (gmt 0)

10+ Year Member




AuthType Basic
AuthName "Access for /backup"
AuthUserFile / ... /htpasswd
require user music
Deny From All
<Files *.mp3>
Allow From All
</Files>
Satisfy Any

Thanks. I got it to work.