Forum Moderators: phranque

Message Too Old, No Replies

how to make a folder not accessible

         

Shanee

11:21 am on Jul 23, 2006 (gmt 0)

10+ Year Member



hello..
i have a folder on my site which contain of MP3 Files, how it possible with HTTACCESS to make that folder not accessible for anyone. but not the MP3 files. i.e i saw a website from which we can download mp3 file like that-site/mp3-folder/file.mp3 but no one can access that that-site/mp3-folder/ folder even with download mannagers browser too and give this messege

Forbidden
You don't have permission to access that-site/mp3-folder/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Thanks

encyclo

5:40 pm on Jul 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have two options, one is to simply create an index.html file within the directory that will be called by default when the directory is requested. This can be a blank page if you want, or a simple link back to another page on your site.

If you don't want to put an index page there, you can use a .htaccess file to stop the autoindex for the directory. The .htaccess should contain this one line:

Options -Indexes

This won't stop hotlinking of the MP3 files, but it will stop the generated directory index.

Shanee

7:47 pm on Jul 23, 2006 (gmt 0)

10+ Year Member



great...... thats really works

Thanks Mate and i hope you guys will help me in the futur must

Shanee