View Single Post
Old 2004-08-05, 01:33 PM   #6
airdick
Shut up brain, or I'll stab you with a Q-tip!
 
Join Date: Aug 2003
Posts: 114
Quote:
Originally posted by Ramster
A regular ReWrite rule won't work!!

Here's a sample gallery url:
domain.com/nude/gallery.html
He's linking to the url like this:
domains.com/nude/image[01-20].jpg

So the htaccess file thinks the referrer IS from you're own domain by him keeping everything there except replacing gallery.html with image[01-20].jpg
|pissed|
Yeah, that's what thought.

My rewrite rules look something like this:

RewriteCond %{HTTP_REFERER} !^http://(www\.)?domainname.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg)$ http://www.domainname.com/hlink.html [R]


The ^ matches start of line, so if the referrering string doesn't begin with my domain name the rewrite rule kicks in.

Would this fix the problem, or is there something else that I'm missing?
airdick is offline   Reply With Quote