somewon Posted November 2, 2008 Share Posted November 2, 2008 RewriteEngine on RewriteCond %{http_referer} !^$ RewriteCond %{http_referer} !^http://([^.]*[.]*)?website.org/ [NC] RewriteCond %{http_referer} !^http://(www.)?google.com/ [NC] Rewriterule (.*.(png|gif|jpeg|jpg)) http://www.webgirlz.org/watermark.php?image=http://www.webgirlz.org/$1 [R,NC] What it's supposed to do is block the hotlinking of images (other than google), and instead call a PHP script with places a watermark on the image and shows that instead. When I try to hotlink an image somewhere, it just lets me hotlink straight to the image and doesn't redirect to the script at all. I know the script itself works. Is there something wrong here? I'm baffled. =B Link to comment https://forums.phpfreaks.com/topic/131112-could-someone-tell-me-why-this-isnt-working/ Share on other sites More sharing options...
corbin Posted November 3, 2008 Share Posted November 3, 2008 Your pattern is cracked out.... (.*.(png|gif|jpeg|jpg)) (.*\.(png|gif|jpeg|jpg)) might work Or (.*\.[png|gif|jpeg|jpg]) Link to comment https://forums.phpfreaks.com/topic/131112-could-someone-tell-me-why-this-isnt-working/#findComment-680938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.