Posts Tagged ‘mod_rewrite’

Transclusioning Images without permission is bad, mmmkay?

Tuesday, May 20th, 2008

Why do people think that it is ok to steal my bandwidth to host images for them? I guess this internet thing must be free.

Another dork thought it was a good idea to use an image off my website in their forum profile. http://forum.dzmusique.com/discussion-generale/se-separer-a-cuase-du-voile-t1298.75.html

Not only that, but it happened to be a 1280×1360px image that was being sized down to 100×100 by the forum, so each page hit was 350kb of data off my server. Thanks dude, how about instead you get a 680byte .gif called “i-suck-balls.gif”

i suck balls

For those interested, the following code block is responsible for this. Thanks apache and mod_rewrite:


RewriteCond %{HTTP_REFERER} habboxforum\.com [NC,OR]
RewriteCond %{HTTP_REFERER} forum\.dzmusique\.com [NC]
RewriteCond %{REQUEST_URI} !^/images/i-suck-balls.gif [NC]
ReWriteRule .*\.(gif|jpg|png|jpeg)$ http://www.ub3rgeek.net/images/i-suc
k-balls.gif [L]