Apache Server configuration support - Rewrite Question

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > May 2006 > Rewrite Question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Rewrite Question
phil@1918.com

2006-05-29, 5:40 pm

Okay, I'm stumped.

I have what I thought was an easy job to do. I want to keep one site
from pulling a picture from my site.

I already have another rewrite in place to do some watermarking of
other images.

Here's my snippet of rewrite:

RewriteEngine on
#RewriteCond %{HTTP_REFERER} ^http://www.severinfilm.hu/
#RewriteRule .*\.jpg$ /babe_stealer.jpg [R,L]
#RewriteRule ^/watermark.* /babe_stealer.jpg [R,L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mysite.com/ [NC]
RewriteRule ^/watermark.php?image=(babe_.*\.jpg)$
/watermark.php?image=babes/$1 [
R]
RewriteRule ^/images/(babe_.*\.jpg)$ /watermark.php?image=babes/$1
[R]

Although I have the top three commented out right now, they are the
ones that have me confused. All I'm attempting to do is... if the
request comes from that domain, serve up an alternate image, if the
request doesn't come from that domain or mysite, go ahead and watermark
my images.

When I enable the top three lines, all other domains get the alternate
image, not just the one specified. Since I'm on day 2, I know it must
be something easy I'm missing.

Any and all help appreciated.

Robert Ionescu

2006-05-29, 5:40 pm

This is a multi posting, I posted in comp.infosystems.www.servers.unix

--
Robert
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com