well you have nothing in that code that is re-writing. it is just faling the pag i think.
i just verified that this code works here on code newbie.
Code:
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(.*)?mysite\.com [NC]
RewriteCond %{REQUEST_URI} !^(.*)/nohotlinking.gif [NC]
RewriteRule ^(.*)\.(gif|jpg)$ http://mysite.com/images/nohotlinking.gif [R]
of course ou will need a nohotlinking.gif image on your site, .. and change the name appropriately.