View Single Post
Old 2005-01-14, 10:49 PM   #16
MrYum
Arghhhh...submit yer sites ya ruddy swabs!
 
MrYum's Avatar
 
Join Date: May 2004
Location: Sunny Florida!
Posts: 5,108
Send a message via ICQ to MrYum
Excellent info everyone...thanks!

Some of this is actually starting to sink in...I think...lol.

Yep Swedguy...makes complete sense. Got that from one of the searches I did prior to posting. Even went so far as to create a quick banner saying the images are hotlinked and go to http://www.mydomain.com/ to see the images.

Perhaps true PM, but both of the online utilities I was using specifically mentioned the no referer issue. One would think they would pass referer info along in their tests to verify the htaccess is working. But, perhaps not...

Okay, so based on what I'm reading here...how's this look?

RewriteEngine on
RewriteCond %{HTTP_REFERER} usefulidiots [OR]
RewriteCond %{HTTP_REFERER} fusker [OR]
RewriteCond %{HTTP_REFERER} webrats
RewriteRule .* - [F,L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.anotherdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://anotherdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.anotherdomain2.com [NC]
RewriteCond %{HTTP_REFERER} !^http://anotherdomain2.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.anotherdomain3.com [NC]
RewriteCond %{HTTP_REFERER} !^http://anotherdomain3.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com [NC]
RewriteCond %{HTTP_REFERER} !^http://google.com [NC]
RewriteRule ^.+\.(gif|jpg|png|swf|mpg|avi)$ http://www.mydomain.com/img/hotlinked.gif [NC,F,L]
ErrorDocument 404 http://www.mydomain.com/
ErrorDocument 403 http://www.mydomain.com/

Is it correct to have both a deny and an allow in the same htaccess?

Would just load this bad boy up and try it out...but really would prefer not to crash my server...lol!

Thanks again everyone...really appreciate the assist
MrYum is offline   Reply With Quote