Is it possible to server up a iframe for people hotlinking your swfs and images?

Something like this?


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?MyDomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.MyDomain.com/Index.html" frameborder="0" width="300" height="550" scrolling="no" marginheight="0" marginwidth="0"</iframe> [R,L]

This code is not working. Is it possible? How would i write it?