Redirecting some image requests ...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 51256
interpreted = N
texte = What's the easiest way to prevent certain images from being downloaded from the server when the referrer is not one of my pages? I'm thinking of something like the following, has anyone ever tried this before -- or something like it?This (theoretical) technique uses an image tag to call a .tpl page instead of calling an actual image file. The name of the real image file is passed to the server along with the 'check.tpl' file reference. Then when the 'check.tpl' page is requested, it redirects the request to the proper image file or the 'bad image' file, depending upon whether or not the referrer contains my domain: --- image tags in my web pages: --- --- code in my check.tpl file: --- [showif [referrer]^www.mydomain.com] [redirect images/[imageFile]] [/showif][hideif [referrer]^www.mydomain.com] [redirect images/BadImage.gif] [/hideif] .... or maybe another way to do this would be to include the image file -- although I think I have had problems trying to include high ascii data before such as that found in image files: --- code in my check.tpl file: --- [showif [referrer]^www.mydomain.com][include images/[imageFile]][/showif][!] [/!][hideif [referrer]^www.mydomain.com][include images/BadImage.gif][/hideif] Earlier browsers never used to send the referrer in a method=POST, but several I have tested lately seem to send the referrer. So maybe this former limitation of using the referrer tag is resolved now? -- Sincerely, Kenneth Grome ------------------------------------------------------------- Outsource your WebDNA programming for $18 an hour or less! -------------------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Redirecting some image requests ... (Alex McCombie 2003)
  2. Redirecting some image requests ... (Kenneth Grome 2003)
What's the easiest way to prevent certain images from being downloaded from the server when the referrer is not one of my pages? I'm thinking of something like the following, has anyone ever tried this before -- or something like it?This (theoretical) technique uses an image tag to call a .tpl page instead of calling an actual image file. The name of the real image file is passed to the server along with the 'check.tpl' file reference. Then when the 'check.tpl' page is requested, it redirects the request to the proper image file or the 'bad image' file, depending upon whether or not the referrer contains my domain: --- image tags in my web pages: --- --- code in my check.tpl file: --- [showif [referrer]^www.mydomain.com] [redirect images/[imageFile]] [/showif][hideif [referrer]^www.mydomain.com] [redirect images/BadImage.gif] [/hideif] .... or maybe another way to do this would be to include the image file -- although I think I have had problems trying to include high ascii data before such as that found in image files: --- code in my check.tpl file: --- [showif [referrer]^www.mydomain.com][include images/[imageFile]][/showif][!] [/!][hideif [referrer]^www.mydomain.com][include images/BadImage.gif][/hideif] Earlier browsers never used to send the referrer in a method=POST, but several I have tested lately seem to send the referrer. So maybe this former limitation of using the referrer tag is resolved now? -- Sincerely, Kenneth Grome ------------------------------------------------------------- Outsource your WebDNA programming for $18 an hour or less! -------------------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Odd search results, or odd programmer, not sure which... (2002) Time code! (2002) OT: Version Control (2007) Runtime version ... (2003) covertchars db to keep CR's, but not new ones (2002) test (2000) RE: Migrating to NT (1997) all records returned. (1997) [OT] Looking for WC web dev help (2003) MacActivity and PCS (1997) WebCommerce: Folder organization ? (1997) Newbie Tax Question (1997) [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (2012) No Line Breaks from OSX server (2002) Digital Postcards (1999) [ListFiles] & [loop] (1998) exclusive db lock with webcat-3 ? (2000) PCS Customer submissions ? (1997) Encrypt question. (2000) How to Sort Summ data ? (1997)