I have a selfhosted wordpress blog , The htaccess I currently has is # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress AddType Applicaions/CAB .cab Code (markup): No I want to prevent hotlinking to my files and display a page on my site. I looked around on google and found this RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://([a-z0-9]+\.)?1800pocketpc\.com [NC] RewriteRule ^(.*)\.(gif|jpg|png)$ http://www.1800pocketpc.com/sorry-hotlinking-has-been-disabled?$1.$2 [NC,L] Code (markup): I was wondering if its correct , and so does the final code looks like # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://([a-z0-9]+\.)?1800pocketpc\.com [NC] RewriteRule ^(.*)\.(gif|jpg|png)$ http://www.1800pocketpc.com/sorry-hotlinking-has-been-disabled?$1.$2 [NC,L] RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress AddType Applicaions/CAB .cab RewriteEngine on Code (markup):