I can't find a way to do it. Is it even possible?
|
feedback
|
migrated from stackoverflow.com Aug 25 '09 at 19:11
This question came from our site for professional and enthusiast programmers.
|
You could create a custom script and redirect all your images to that script. It's kind of a big overhead but it works if it's your only option. For example http://yoururl.com/img.php?image=banner.jpg And that script would contain for example:
Note!!! This is just a dummy example and you should add validation to your script, to prevent attacks using "../" parts etc. | ||||
|
feedback
|
|
Yes, mod_expires will work via .htaccess files. Put this in your .htaccess file:
| |||||
feedback
|
|
windows based hosting with godaddy doesnt support .htaccess, you have to ues web.config | |||
|
feedback
|
|
Like this:
If you want a shorter caching period, remove | |||
|
feedback
|