Protecting directories from being accessed


#1

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 http://www.theurl.com/mp3 that they dont have access

Thanks

Jason


#2

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…


#3

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


#4

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.

Mark


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


#5

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.


#6

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.


#7

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


#8

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.

http://httpd.apache.org/docs/1.3/howto/htaccess.html

Mark


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