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

RE: [cobalt-users] .htaccess to pevent hotlinking Raq4



> 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?
> 

Is the closing / there when you view the site? I've noticed that using
that .htaccess that www.domain.com instead of www.domain.com/ the images
are broken.
-- 
Dan Kriwitsky

Please reply to the list only. Offlist replies are not read.