How to stop leechers??

They have: 4 posts

Joined: Feb 2006

Hi i'm starting to work on my first web site and i'm fairly new to all of this. On my site, I'm going to host downloads. I've noticed on most popular web sites, when you download a file, you can't see the link that you're downloading from, which would prevent people from using your link on their page, using your bandwidth. How can I set my site up to do the same? Sorry if I posted this in the wrong place, I wasn't sure where to put it.

They have: 96 posts

Joined: Jul 2005

Best thing to do is put a HotLinking Protection.

If your hosting company support it. Create a .htaccess file and put this into it

Quote:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|tif|png)$ http://www.yoursite.com/hotlinkreplace.jpg [R,NC]

Replace "yoursite" with your domain name, replace hotlinkreplace.jpg with an image as a subsitute for replacing the real content (make sure to upload it to the path you specify) and upload the .htaccess file to your public_html (root)
server

They have: 4 posts

Joined: Feb 2006

Do I make this htaccessfile in notepad?

They have: 4 posts

Joined: Feb 2006

I tried putting that code into a notepad file, and making it into an .htaccess file, then uploaded it to my root server, but it didn't do anything. I believe it's because my web host isn't compatible with it. Alot of the options for my web server are for linux systems. I'm running windows xp. Are there any more options to mask the url of my downloads?

chrishirst's picture

He has: 379 posts

Joined: Apr 2005

more probably that notepad called the file .htaccess.txt

DC_Sara's picture

She has: 392 posts

Joined: Jan 2002

If you FTP it over, rename it once it's on your server. Smiling .htaccess could be hidden as well in your FTP program. I use -al in Smart FTP to show hidden files.

~*Sara*~

garethcbrown's picture

He has: 52 posts

Joined: Feb 2006

I have a severe problem with image theft and my artwork is posted in forums and on fansites all over the place. I contacted my hosting service to ask them about it and they said about disabling right click (already implemented that code since day one) and they also provided a link to hotlink protection and .htaccess. Trouble is, I tried it several times and can't for the life of me get it to work.

I want to show an "image theft" notice that I have made to replace whatever image people are stealing.
I also still want to allow search engines and their image searches to index my images but obviously block people from actually posting them.
Is this possible?
Can anyone tell me what code I need or why I couldn't get it to work?
I'm on XP and my hosting service is Fasthosts with my site hosted on Windows 2003.

Please help

Freelance Illustration,
Christmann Creative
Illustration Blog Christmann Creative Blog
My music on Myspace My Music

chrishirst's picture

He has: 379 posts

Joined: Apr 2005

.htaccess doesn't work on IIS (the MS webserver)

If you have DB capabilities, I have some ASP code somewhere to display images without exposing the image name and URL in the source code.

Chris

Indifference will be the downfall of mankind, but who cares?
Venue Capacity Monitoring
Code Samples

He has: 37 posts

Joined: Feb 2006

cPanel has a very simple method of hot-link protection. If you have cPanel, look near the bottom and you will see it there. It's extremely simple to use and effective.

If you would convince a man that he does wrong, do right. Men will believe what they see.
-Henry David Thoreau

Busy's picture

He has: 6,151 posts

Joined: May 2001

htaccess blocking can be difficult to test as your images will be loading from cache, and remember there are two (sometimes more) caches to clear (yours, and servers). So 90% of the time it will appear not to be working for you.

A good way to check if it works is to block everyone from viewing and if it blocks you, it's working (don't forgot to take the block off after you done).

garethcbrown's picture

He has: 52 posts

Joined: Feb 2006

Just received this email!

Dear Gareth,

Thank you for your enquiry.

.htaccess files only work on Linux domains, not Windows domains.

On our servers their use is limited to Frontpage Extensions and URL Security, provided those items are installed on your control panel.

But they will not work on your Windows domain.

Regards,
Chris Davis
Xtreme Support Team
Fasthosts Internet Ltd.

Not good! So what do I do? Change all my file names until they steal the re-named files then rename them again and again and again!

Freelance Illustration,
Christmann Creative
Illustration Blog Christmann Creative Blog
My music on Myspace My Music

He has: 37 posts

Joined: Feb 2006

I would get a linux server... provided that's possible.

dk01's picture

He has: 516 posts

Joined: Mar 2002

Michael Allison wrote: I would get a linux server... provided that's possible.

:werd:

garethcbrown's picture

He has: 52 posts

Joined: Feb 2006

If I switch to Linux, then I can't have ASP can I? So my contact forms won't work.

He has: 37 posts

Joined: Feb 2006

You can have ASP... You just need your host to install it, if they haven't already.

Basically, there is nothing a windows server can do that a linux server can't do.

I don't know any serious webmasters that use windows servers - none. That means well over 90% of all webmasters use linux servers. I believe the actual numbers of windows vs. linux servers are about 10/90 or so. Basically, linux owns the server market just as windows owns PCs.

If you would convince a man that he does wrong, do right. Men will believe what they see.
-Henry David Thoreau

garethcbrown's picture

He has: 52 posts

Joined: Feb 2006

I switched to Linux then before I could cancel I saw that ASP was no longer enabled and the option to enable it had been greyed out and it was no longer clickable.
I'll have to wait a few hours now until the changes take place to be able to switch back.
Damn!

I'll just have to accept my hosting service doesn't allow for Linux with ASP or support .htaccess

or change host providers?

Freelance Illustration,
Christmann Creative
Illustration Blog Christmann Creative Blog
My music on Myspace My Music

garethcbrown's picture

He has: 52 posts

Joined: Feb 2006

my site has not come back online yet and it's been more than "a few hours" but I managed to login to the hosting service control panel and switch back to windows server. Just hope the site comes back online quickly!
Getting a bit worried now. Confused

Freelance Illustration,
Christmann Creative
Illustration Blog Christmann Creative Blog
My music on Myspace My Music

garethcbrown's picture

He has: 52 posts

Joined: Feb 2006

The site obviously went back up eventually but I've lost my position in Google for my optimised keyphrase.

So, I can only switch to Linux and use .htaccess if I pay for Frontpage Extensions and URL Security. I don't need Frontpage Extensions installed as I've already built my site but they want another £20 per year for that and another £10 for basic security. I know it doesn't sound much but I can't really afford it at the moment.

I think for know I will have to accept the image theft and just change the certain filenames to show a nasty message.

Freelance Illustration,
Christmann Creative
Illustration Blog Christmann Creative Blog
My music on Myspace My Music

He has: 37 posts

Joined: Feb 2006

That stinks!!!

Sorry about that. I hope you get it worked out. Smiling

He has: 37 posts

Joined: Feb 2006

Hosting companies...

I use hostgator and they're great, but I don't think they support ASP. Maybe after your site is back up we can see about changing any asp functions on your site to php. Everyone supports php. But, then you have SEO worries about changing file extensions.

Sometimes, ya just can't win! Sad

If you would convince a man that he does wrong, do right. Men will believe what they see.
-Henry David Thoreau

dk01's picture

He has: 516 posts

Joined: Mar 2002

I can't recommend a better host than dreamhost.com

I have been with about 6-10 hosts in the last couple years and they are by far the best and let you have the most bw/space for the price. I can get you a special deal if you PM me ($24 for the first year!) since I have been hosting with them for a while.

edit: This isn't an advert my any means either. I am just a super satisfied customer. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.