Htaccess - RewriteRule problem

Halo.

I’m an AS3 programmer and don’t know much about htaccess. So please help

I uses hotlink protection:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?MyDomain\.com/ [NC]
RewriteRule .*\.(gif|bmp|xml|swf)$ - [F,NC]

The above code works fine. But I also want to allow blank referrers:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?MyDomain\.com/ [NC]
RewriteRule .*\.(gif|bmp|xml|swf)$ - [F,NC]

The additional line of code ruins Hotlinking Redirection. Error document doesn’t show up any more.

What am I doing wrong?

Regards

What do you mean by “Hotlink redirection”. And in which case do you think the error document should show up when it doesn’t?

By “Hotlink redirection” I mean that RewriteRule doens’t work.

I would like the error document to show up when site user write down something like this:

www.MyDomain.com/preloader.swf
or

www.MyDomain.com/menu.xml