htaccess / hotlink prevention / nowww!
Posted by: dwr
Posted on: 2007-11-19 22:04:00
From the amazing Dreamhost Wiki, I find that I can put this:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www.)?example.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .(jpe?g|gif|png)$ - [F]
into my htaccess to prevent hotlinking. What I'd like to know is, does it make any difference if you are using all non www sites (the example.com above has the www) and if so what should be changed?