A while back, I discovered that someone was embedding one of my photos in their own web site. It showed up in my referer logs pretty frequently. I contacted the owner and asked him to stop. I never heard back.
So I decided to have a little fun with him.
If you're easily offended, stop reading right here. I don't want to read your complaints if you think I've done something crude. Go elsewhere and take your judgments with you. Thanks.
Anyhoo, the image he used was this one. It's the house I owned in Ohio before I moved to California and decided to pay twice as much for a crappy apartment. He linked to it from this page. So I decided to use mod_rewrite to serve a different image to his visitors and only his visitors.
(You may see the wrong image on his site if your browser decides to cache it. Just force a reload (shift-reload on most browsers) if you do.)
How'd I do it?
Easy.
Added this to the right VirtualHost block of Apache's httpd.conf file:
RewriteCond %{HTTP_REFERER} ^http://members.asianavenue.com/I_am_that_guy/$ RewriteRule ^/pics/house/DCP00047-320.jpg$ /images/babyshit.jpg [P]
Tested it, and restarted.
Magic.
Go forth and spread the mod_rewrite love.
And don't use my images without asking. It's just rude.
Posted by jzawodn at June 30, 2003 02:18 PM
Yeah, mod_rewrite is a Darn Cool Thing. I've used it in most of my projects for the last 3 years (including my homepage) to redirect all the nice (and search-engine-friendly) URLs to a single PHP script, that then does all the magick.
No matter what, the original image that is supposed to appear on *your* site is the same as on his, this cute baby ;-). I tried it on three different browsers.
Anyway, examples of the wonders of mod_rewrite are always welcome, especially when they are illustrated :-)
i wonder what image you'll have to come up with in order to deal with the inevitable use of the baby picture by another site.
I LOVE IT! Stealing images just really sucks. Most of the work I do involves photographers and they really hate to have their images stolen...so we use mod_rewrite quite a bit...maybe we should do something like this instead!
Excellent!
Too funny!
Reminds me of one of the overclocking sites I frequent. They found out some other site was stealing their images, and copying their hardware reviews.
The whole forum contributed images of readers flipping the bird, then implimented the mod_rewrite stuff. The stealing site had nothing but images of people flipping the middle finger.
Way too funny.
i generally use the goatse.cx picture for exactly this purpose.
That's funny. I used to work for the company that manages those sites. I forwarded the link there for a good laugh.
I had this problem too.
I eventually decided to just block access and I use Apache's SetEnvIf directive to check the referrer.
It won't happen again as I protect all my images using this technique now.
Sad.. but you might have to fight off the Internet Nazi's now for posting child porn ...
oth.. use mod_rewrite to give them a nice photo of some fermented roadkill..
Check the IP of this dubious entry with http://www.geobytes.com/IpLocator.htm and tell us whether the distance to Beverly Hills, CA is significant ;-)
i too feel a bit uncomfortable with the usage of that baby picture - it's not the kiddie-porn aspect. its the fact that the kid didnt, and cant, give consent to having an embarrassing photo spread far and wide across the internet.
the kid IS a human being. you should respect that.
much better with some roadkill picture , as suggested above.
sorry jeremy, but i just feel its plain wrong to post that baby photo - and in bad taste.
cool mod rewrite tip though... i can see the funny side of it.
What part of this:
If you're easily offended, stop reading right here. I don't want to read your complaints if you think I've done something crude. Go elsewhere and take your judgments with you. Thanks.
Was unclear?
you'll understand Jeremy when you have a kid yourself. My perspectives on this sort of thing certainly changed when i had my first kid a year ago. Yours probably will too , in time.
Good blog otherwise, but i still think that was in bad taste. Not your best moment (your best was the "PageRank is Dead" moment - loved that one!)
What the hell -it's your blog...!
I think it was a great selection of a photograph for this situation. I am curious, however, in what context your house picture was used?
> you'll understand Jeremy when you have a kid yourself.
(rolling eyes)
You'll understand when you have a sense of humor yourself
Yes... poor kid. He will be traumatized for the rest of his life. He will be know like the kid who made chocolate pupu.
And is your fault Jeremy!
(End of sarcasm)
C'mon netron!!!. Admit it... it was a good one!
I can see what newton is saying. And no I don't have kids. It's funny thing to do. And easily offended is one thing, but this is a grey area of when you should have rights to distribute things. I guess since the parents probably took the photo they are legal guardians of the child, and therefore it can be distributed however they want it. If that kid is grown up now and doesn't care that that photo is distributed around the net, then that's cool too. However there is a point with the protecting rights of children.
I don't think the mod_rewrite thing was ever meant to get into a big argument about stuff like that anyway. It's a good trick to know and use :)
You people must be mental. You are actually arguing that this baby's rights have been violated? No one even knows who this kid is. It is "Generic Baby who's parents took a picture of it crapping because they are freaking weird" in the minds of every person who sees it. There is no violation of rights here. What right would they be violating? The right to privacy? ITS A FREAKING BABY!
If I had such a picture of one of my childs, I would provide it for that reason!! :)
"Unfortunately" the guy realized it!
[quote]
"Tuesday July 1st, 2003: [...] Sorry Jeremy...looks like you got me back g-o-o-d. [...]"
[/quote]
:( ;)
>You'll understand when you have a sense of >humor yourself
its staggering how there is such a lack of human empathy in the world. "humor" at the expense of others misfortune isn't "humor". It's just plain wrong - especially when it's a child. Its just wrong wrong wrong. Pity some other people viewing this board seem to have a total lack of morality or sense of empathy towards other human beings on this planet.
But , it IS jeremy's blog - so i'd better get off my soapbox, shut the hell up, and respect Jeremy's freedom of speech. i do so under protest, but i do respect, highly, his right to speak freely. I just want to make that point - i'm not a Christian funde Nazi - i'm an atheist libertarian.
As a father of two, I can guarantee you that all of you -- every mother's son or daughter -- generated effluvia like that and much, much worse. It's amazing the messes that newly-minted moms and dads handle. If this photo is the worst embarassment this young lady suffers, she can count herself lucky! And just to be sure, put a dollar in her therapy fund.
I have used mod rewrite to have nice search engine friendly links on some webpages I made, but I have never thought of this idea with the stolen pictures. VERY cool... I'll try this sometime! CJ
U r sad and sick for putting a image like that on the web for all to see. I dont care if you dont want to read my complaint...at least everyone else will. You should feel lucky that you are so far away from me (i'm from england) as i could quite happily come and knock your head off!!
Mod-rewrite is one of the coolest features I've seen in a while, use it all the time to make more SEO friendly sites.
A really nifty script I got at scriptdownloads.com basically automatically creates the code needed for modrewrite ;)
Jeremy's fun with mod_rewrite helped me with two things. 1) Realise that mod_rewrite is fun and 2) create doriat mod_rewrite board. That would be good to create a collection of personal stories about mod_rewrite as well :) At any rate mod_rewrite is cool and more i get into it more fun i have with it. Thanks for sharing this story Jeremy and thank you being somewhat my inspiration :)
Do you think you a hacker?? :)))))))
The problem is that he just linked your image and not copied to his server! :)))
I recently found your page searching internet for more mod_rewrite information...
Idi nahui, daun, bliat'!
Pretty cool o:)
Anyway I would also advise everyone to watermark all your valuable pix because the thieves can copy them to their own site as well...
Ha! Similar thing happened to me recently: http://blog.underafter.com/2005/12/05/busted/
I just swapped out the image, nothing too fancy. But I like your solution. Nice work!
Found this site while on a hunt for 'mod_rewrite' stuff. I love your use of it - I will be adopting it for my use. Thanks for the tip.
I do some examples mod rewrite: http://sf.jogger.pl/2007/05/02/mod-rewrite-w-przykladach/