I want to prevent hotlinking of images and media on my site.
I would like it so that any hotlinked files are simply not displayed, any directly linked files (with referrer info) result in the user being redirected to my home page and any cases with blank referrer info resulting in the image being displayed.
I want to allow display of images on my own domain (www.ohlookaforum.com) and on a couple of my blogs (ohlookaforum.blogspot.com and ohlookaforum.wordpress.com)
Is this code correct? -
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$|.*mp3$|.*wav$|.*swf$|.*mp4$|.*mpg$|.*flv$|.*avi$|.*bmp$|.*jpeg$|.*mpeg$ [NC]
RewriteCond %{HTTP_REFERER} ...

English |
French
News of Apache mod Rewrite