Hi i have a rewrite that helps stop my hotlinking problem but i need to make an exception for one of my sites, the sites are both on the same server.
here is the rewrite
Code:
#block images by direct url
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://xxxxxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxxxxx.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxxxxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xxxxxx.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|wmv)$ - [F,NC]
#end block
i need to make an exception for lets call it
http://www.newsite.com
so if the referer is from
http://www.newsite.com it is ok for them to link the image.
I have two sites, and i have members that belong to both sites, they want to be able to link images from the other site.
Thanks
Update: did some reading and it seems like i can just use the same thing but with an L option which will not execute the rest.
So if i use it like this i wonder if it will work.
Code:
#block images by direct url
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://newsite.com/.*$ [NC,L] # If referer is from this site then stop the rewrite and allow image link
RewriteCond %{HTTP_REFERER} !^http://xxxxxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxxxxx.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxxxxx.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xxxxxx.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|wmv)$ - [F,NC]
#end block
UPDATE: well that totally blew up right in my face lol guess that doesnt work lol