mod_rewrite help

happyhatter

Registered Member
Joined
Jan 26, 2009
Messages
61
Reaction score
3
I'm trying to get this example Search a database of images to work but it uses mod_rewrite.

I found a mod_rewrite sample for images here but I'm not quite sure what to put in the QUERY_STRING:

Code:
RewriteRule ^(.*)\.jpg /pix/feeder.php?image=$1&%{QUERY_STRING}
All .jpg requests are passed on to a PHP script, with the image name passed in as a parameter. Why do we do this?

• it saves a directory with a large number of pictures getting cluttered
• it allows us to monitor where images are loaded from (the referer) so highlighting any images hotlinked from other web sites
• it allows us to generate dynamic images (for example, this diagram of current train cancellations on First Great Western ;-) )
• it allows us to feed out low res or high res alternatives
• it allows us t maintain image data with the image
• and it allows us to use selected URLs to generate a random image.
 
Last edited:
Back
Top