Thanks for the advice and the lines of code. I already have an htaccess file as follows:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://([a-z0-9-]+\.)*mydomain.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://([a-z0-9-]+\.)*avscompany\.com/ [NC]
RewriteRule /* http://%{HTTP_HOST}/ [R,L]

Do I just paste the two lines of code that you provided after the last RewriteCond?

If I'm being a pain, just let me know.
Thanks for your help.
Michael