I'm hosting an image sharing site and I seem to be running into an unusual problem. I use the Apache module mod_rewrite to make all the urls to each image much shorter than they would be otherwise, but this seems to be preventing other modules such as mod_bw or mod_bandwidth from working, since the user isn't technically requesting to download a file.
My problem occurs when someone uploads a 2mb animated gif. Sometimes the gif will steal all the bandwidth to the server and render my site useless. I need a way to detect when users want to view gifs and then limit their speed to something more reasonable.
The only way I can think about doing this is if there was some Apache module that detected the .gif at the end of the url, and then kicked on the bandwidth limiting. Is this even possible? Or is there something else I can do?