Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Location
    Wall, NJ
    Posts
    2

    mod_rewrite question

    I know mod_rewrite is a magic potion for a lotta stuff, but I have a question. I currently use a simple mod_rewrite for sending folks that hot link to images on our servers an image called "stolen.gif". It works fine, they hotlink when asked not to and instead of the image they link to, they get the stolen.gif image.

    But I have a dream...fantasy even

    What I would like to do is allow them to hotlink (even though I asked them not to) but instead of sending them stolen.gif, I'd like to use mod_rewrite to send the image they requested but to have that image link back to the page they stole it from

    I'm not sure how this could be done or even if it could be done - that's why I came to ask the experts Thanks in advance for your help!

    TimS
    StripersOnline.com

  2. #2
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    716
    I'm not so sure it could be done (easily). For one, you might have a image on multiple pages (likes a header/footer).

    My .02 $ CAD
    www.kneuf.com
    Proudly Canadian

  3. #3
    Join Date
    Apr 2004
    Location
    Wall, NJ
    Posts
    2
    It really shouldn't matter how many images are on a page because even if there were a dozen of the same images on a page, a call to my server for the image is a call for the image If someone hotlinks to an image, they're only going to get it once, even if I have it plastered on a page a dozen times - right?

    Maybe my question was too specific...which is entirely likely

    Can mod_rewrite be used to append HTML code to an image request? I mean, it's easy to use it to send "stolen.gif" to websites that shouldn't be hotlinking - can it send "stolen.gif" plus a line of code or text?

    Thanks in advance

    TimS

  4. #4
    Join Date
    Nov 2001
    Posts
    551
    in short. no.

    because of the way browser work, they load html, then the images linked. (mostly true, some use fancy threading and such). so by the time the viewer from the offending page requests the image from your server they already have the html.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •