• I created a subdomain for my site for images : img.mydomain.com; and my image uploads are stored in the wp-content/img folder (in that subdomain)
    However, when i link to the image from my main site blog posts (i use permalinks) images are not displayed. instead i see a broken link.

    I created a .htaccess file and placed it in the wp-content/img folder to restrict hotlinking. The contents of the .htaccess file shown below:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://([a-z0-9]+\.)?mydomain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !google\. [NC]
    RewriteCond %{HTTP_REFERER} !bloglines\. [NC]
    RewriteCond %{HTTP_REFERER} !feedburner\. [NC]
    RewriteCond %{HTTP_REFERER} !live\.com [NC]
    RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
    RewriteRule .(gif|jpe?g|png|js|css)$ – [F,NC,L]

    Please help, i don’t know what could be wrong with the .htaccess file. and i have limited programming skill.

    Thanks in advance.

The topic ‘Hotlinking Issue’ is closed to new replies.