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:

[WebDNA] unsubscribe (2008) [TaxableTotal] - not working with AOL and IE (1997) checksum for Discover credit cards (1999) filtering extra characters from credit card numbers (2001) Not really WebCat (1997) Setting up WebCatalog with Retail Pro data (1996) [TaxableTotal] - not working with AOL and IE (1997) WebCat2b12 forgets serial # (1997) web delivery (1997) I'm new be kind (1997) TCPsend with POST? (1999) i'm dumb today (2004) [OT] JavaScript Error (2002) Log-in Scheme (2003) WebCatalog for Postcards ? (1997) Add to Cart & List of Products (1997) recomend ftp (2001) Emailer problems. (1998) REPOST: Upgrage pricing... The future of WebCatalog is comingwith 4.0... (2000) Comments Convertion (1998)