[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] .htaccess to pevent hotlinking Raq4



Hey everyone,

Been through the archives, been through google and spent the last 4 hours
trying to prevent hotlinking of graphics.  The most common answer found for
.htaccess file is:

----------------------------------------
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]

Be sure to replace "mydomain.com" with your own. The above code causes a
broken image to be displayed when its hot linked.
----------------------------------------

Which works except that it also disables the images when viewing the protected
site as well.  Cleared cache, opened a new browser, typed in the v-site, all
images broken.  Permissions are correct, site typed in correctly and the
.htaccess file is in /home/sites/site1/web/images directory.  What am I
missing?  Syntax change for a virtual site? Problem since it's the first site?

Thanks in advance,

Dave~