SetEnvIf Referer "^http://example.com/" let_me_in
# Remember that the referer isn't always sent. The following line lets
# them in too, if you don't want this, comment it out with a #
SetEnvIf Referer "^$" let_me_in
Deny from all
Allow from env=let_me_in
You can change "^http://example.com/" to your URL, if you want to only allow a certain URL like http://example.com/page.html
put a $ before the last " ("^http://example.com/page.html$").
Edit: this page (http://httpd.apache.org/docs/1.3/env.html
) has more information.
Edit2: forgot "let_me_in" after SetEnvIf Referer "^$".