Forum Moderators: phranque
I have the following in the .htaccess file wihtin a directory called 'img'
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?somesite.com/.*$ [NC]
RewriteRule \.(gif¦jpg¦png)$ http://www.somesite.com/nasty.gif [R,L]
Of course, ive changed the domain names, but when I view any of my pages locally, i get broken images.
What things could I be missing?
[edited to add:]
If I add this line, then images show up when viewing locally
RewriteCond %{HTTP_REFERER}!^http://localhost/.*$ [NC]
more questions to follow...
Welcome to WebmasterWorld!
That is in fact the correct solution.
You might also want to add [127.0.0.1...] (standard IP address of all localhost machines) to the exclusion list.
Jim