Protecting directories from being accessed


I have set up a small flash mp3 player and would like to stop people accessing the directory of mp3’s but allow the flash player to work.

I found I have to use htaccess / WebDAV but dont understand it.

I have tried password protection, but that makes users enter a password :stuck_out_tongue:

I dont understand webdav

Forbid linking to files in this dir? I select yes

Forbidden file extensions: I Leave blank to forbid all files

Can someone help me get a configuration that stops people browsing the directories but allows the player to work.

I want if someone enters that they dont have access




if i understand correctly… you just want to stop pple from looking in a directory?.. if so, just put an index.html page in the directory…

my apologies if that is not what you meant…


That will do, thanks. I didnt think of doing that.


As well as adding the index.html file,you might want to also implement the .htaccess method, to prevent direct linking to the MP3 files.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


Yeah, I’d recommend reading up on using .htaccess, but if you don’t do that, you should probably add the directory to robots.txt at least.

Check out Gordaen’s Knowledge, the blog, and the MR2 page.


If you want the files to still be accessible but just not allow people to list the directory, you create a file called .htaccess and put it in the directory, and put “Options -Indexes” on the first line. (No quotes)

This would allow you or anyone who knew the filename to still access the file, but a person couldn’t just browse the directory.


im confused with using htaccess / WebDAV through web panel? or do I use this or do i use a custom htaccess file?

Thanks for the tips so far


I find it easier just to create the .htaccess file and drop it into the relevant directory. You can do a lot with .htaccess files, only some of this functionality is supported by the panel.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )