However, I now have the need to allow images in a specific directory to BE ABLE to be linked from outside sites. So in essence, block everything except images in a particular directory. How the heck do I do this? Below is the code that so far works for allowing me to block linked images can anyone help? Thanks in advance.
P.S. The reason why I ask this is that I am including it in the http.conf not a htaccess file. Otherwise I know I would just not have the .htaccess file in the directory I want to leave open.
- Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://www.mydomain.com/theif.gif [R]