Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
 Post subject: Stop Leechers
PostPosted: Sun Jan 30, 2011 10:12 am 
Offline
A regular
A regular

Joined: Thu Aug 05, 2010 5:04 pm
Posts: 55
Ok, I want to stop leechers from dowloading files from my website. I want it to restrict people from viewing folders, but it would still allow them to download if they have the specific address to the file. Ex http://yourwebsite.com/files/ would be restricted, but http://yourwebsite.com/files/picture.jpg would not be restricted.
Thanks!


Top
 Profile  
 
 Post subject: Re: Stop Leechers
PostPosted: Sun Jan 30, 2011 11:46 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
The easiest way to do this would be to create a blank index.html file in the folder. You could also use the .htaccess file to remove Indexes.


Top
 Profile  
 
 Post subject: Re: Stop Leechers
PostPosted: Sun Jan 30, 2011 11:57 am 
Offline
A regular
A regular

Joined: Thu Aug 05, 2010 5:04 pm
Posts: 55
Sorry I hit 'New Topic.'
How can I do that without putting an index.html into every folder since I have hundreds?


Top
 Profile  
 
 Post subject: Re: Stop Leechers
PostPosted: Sun Jan 30, 2011 10:45 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
Create an .htaccess file in the parent folder of those, containing the following:

Code:
Options -Indexes


Top
 Profile  
 
 Post subject: Re: Stop Leechers
PostPosted: Tue Feb 01, 2011 7:06 am 
Offline
A regular
A regular

Joined: Thu Aug 05, 2010 5:04 pm
Posts: 55
Thank you it worked perfectly.
I also added a custom 403 error message, so this is what the .htaccess file looks like if anyone else has the same problem as I do:
Code:
Options -Indexes
ErrorDocument 403 http://xxx/index.php

Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Wed May 22, 2013 4:35 am
Powered by phpBB® Forum Software © phpBB Group