Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2005-02-09, 10:05 AM   #2
PR_Tom
Nobody gets into heaven without a glowstick
 
Join Date: Feb 2005
Posts: 423
I dont have one that will do that, but I have one that replaces the gif or jpg or jpeg being hotlinked with another image you specify (such as one that says "visit my site to see all of my images" with your url)

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{REQUEST_URI} !^/replaceimage\.
RewriteRule \.(gif|jpe?g)$ /replaceimage.$1 [NC,L]


replace "yourdomain.com" with your domain of course.

replace "replaceimage" (in both places) with an unusual and unique name that you will never name a "real" image! Thats important! (name it something like: qsgrt3lkhj or something)

Then you need to create a gif, jpg and jpeg version of your image! ie:
qsgrt3lkhj.gif
qsgrt3lkhj.jpg
qsgrt3lkhj.jpeg

The code will see where the request comes from, if it isn't blank or yourdomain, and if the image being requested is NOT your "replaceimage", it will replace the image with your new image which you've made.

Hope that makes sense..
__________________
PimpRoll
PR_Tom is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:59 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc