Say I have a folder where I store my download files. The user enters my site clickes a hyperlink to download a file. The link goes to to www.mySite.com/DownloadFolder/DownloadFile.zip. But I want to hide the www.mySite.com/DownloadFolder folder, in order to not allow a user directlly write in browser " www.mySite.com/DownloadFolder" and enter and download all my site and drive a big traffic! When I put permissions 744 to the folder user can't download, otherwise he can enter directly. What to do?

link|improve this question

74% accept rate
1  
This is off topic for Super User - check the FAQ, but would be suitable for webmasters.stackexchange.com – ChrisF Aug 24 '10 at 11:14
feedback

closed as off topic by ChrisF, random Aug 24 '10 at 11:52

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

2 Answers

If you use Cpanel, the option is called Index Manager( under Advanced Group ) panel. Click on the DownloadFolder directory and say No Index

Thats It. Now people can't view the files under the given folder , but able to download them.

link|improve this answer
feedback

If you don't have CPanel on your webhost, but are using Apache (which is very likely), you can use .htaccess to restrict folder indexing.

Create a file named .htaccess (note the dot at start) in your DownloadFolder with this contents:

Options -Indexes
link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.