RewriteEngine On
# 
# Prevent hotlinking (direct-linking) of our .htm/.html and .pdf
# files by requiring that any such requests come from links within
# our own site.  And the only way to get such a link is to visit
# this directory directly (which loads its index.php file), which
# invokes UserBase's protection.
#
# When a matching request comes in that ISN'T from our own site,
# we'll send that user to the /login/ page.
#
# To add new file types to be protected, just add their extensions
# to the list on the REQUEST_URI line below.
# 
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yoursite\.com/
RewriteCond %{REQUEST_URI} \.(htm|html|shtml|pdf)$ [NC]
RewriteRule .* /login/ [R]
