What's wrong with this .htaccess - mod rewrite

Soldato
Joined
4 May 2004
Posts
3,270
Copy+pasted this: http://www.pixel2life.com/publish/tutorials/412/smarter_hotlink_prevention/
Code:
rewritecond %{http_referer} !^$   #check that previous page refers to requested one

rewritecond %{http_referer} !^http://([^.]*[.]*)?.com/ [nc]   #if the referring page is yours...

rewritecond %{http_referer} !^http://(www.)?google.com/ [nc]   #...or Google stop processing the script.

rewriterule (.*.(png|gif|jpeg|jpg)) http://www..com/watermark.php?image=http://www..com/$1

But i keep getting this error:
RewriteCond: bad flag delimiters

Any ideas?
 
Last edited:
thanks, I removed some spaces/newlines and it nolonger gives the errors. But it doesn't actually redirect if I view a hotlinked image. :confused:

Didn't have RewriteEngine On, doh.
Works now :)
 
Last edited:
Back
Top Bottom