I've got this code in my .htaccess file to prevent hotlink of images and pdf files but it is also preventing normal external links to work. My htaccess file:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mywebsite.com/.*$ [NC]
RewriteRule .*\.(gif|jpg|pdf|png)$ http://www.mywebsite.com/images/notallowed.jpe [NC,R,L]
Problem is that a legitime external link to say a pdf file will cause the replacement image to appear instead of the pdf file. ¿Is this normal or what am I doing wrong/missing? Thanks in advance.