RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(www\.)?e-library.exthost\.org/ [NC] RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov) [NC] RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] RewriteRule .*\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov)$ http://e-library.exthost.org/ [NC] # disable directory browsing Options All -Indexes