I want to block hotlinking of PDF files on a site. Previously, I have used this method to block hotlinking for zip files on a different server. Here's my .htaccess:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC]
RewriteRule \.(pdf)$ - [F,NC]
It is nearly identical code to the other site I use it on, except that I have "zip" in place of "pdf". For some reason, on this apache server it's blocking not just pdfs, but everything. PHP and HTML files accessed through the browser are giving the forbidden error. Can anyone see something I am missing in this block or have any ideas what might be causing this?