Thread: Referral URL
View Single Post
Old 01-17-2004, 04:45 PM   #6 (permalink)
arch13
Loves my girl in thongs
 
arch13's Avatar
 
Location: North of Mexico, South of Canada
Bingo,

did a little digging through my refrences and found some lines that fit your need perfectly!
LINK

Read the tutorial, change the variables to your domain and the file extensions you need, and add those lines of code (but leave the empty line between .htaccess and the other lines!)
Good luck
Post back if you need more help.

Edit:
You can also use this for non-apache linux servers (i don't know what 1and1 is using)
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://YOURSITE.COM/.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://WWW.YOURSITE.COM/.*$ [NC]
ReWriteRule .*\.(gif|jpg)$      -       [N,F,L]
with the following qoute by the author:
Quote:
It's a good idea to do both yoursite.com and www.yoursite.com. Also, if you know of any other sites that you want to allow to use your images, be sure to add in a line for them in this file.

If the http_referer doesn't match one of the strings you've provided in those lines, the image request will result in a 403 error.
both methods willl work. Just modify the variables as needed.
__________________
Seen on an employer evaluation:

"The wheel is turning but the hamsters dead"
____________________________
Is arch13 really a porn diety ? find out after the film at 11.
-Nanofever

Last edited by arch13; 01-17-2004 at 04:52 PM..
arch13 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73