Re: hotlinking images
| From: | John Nichel | Date: | Fri, 01 Apr 2005 03:21:25 +0000 |
| Subject: | Re: hotlinking images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212002@lists.php.net to get a copy of this message | ||
Sebastian wrote:
i have an issue with site linking directly to my images. the problem is these images are generated on the fly with php/gd -- they're generated each time its viewed because i have done some watermarking manipulation and didnt want to watermaker them in a static way. they're including the images like this: <img src=http://mydomain.com/script.php?pic=232"> not only is bandwidth usage increase but so does cpu because php/gd has to process them as well.. if they're including 5 or 6 of these images on a single page i can imagin how much cpu is being used. how can i work around this, if at all possible?Are you using apache? This might work in a .htaccess Deny from all Allow from .mydomain.com Satisfy any If that doesn't, maybe a rewrite rule that is normally used for media... http://www.modwest.com/help/kb1-223.html Try just changing/adding the php extension (don't know if that will work, but it's worth a shot). -- By-Tor.com ...it's all about the Rush http://www.by-tor.com