Take the 2-minute tour ×  I am rewriting php generated
thumbnails with igly urls into nice ones. instead of
img.php?src=bla.jpg&w=200&h=100 the static filenames IMG-
file_w200_h100.jpg  Because the rewrite is so complex and
involves many variations, only urls starting with IMG- should be
listening to the rewrite rule. The conditional first rule
however doesnt seem to work: if i change it into IMF or
something else, it still fires the rewrite rules! Any ideas as
to why the conditional doesnt work?  # Rewrite imgcpu?src=
thumbnail maker to nice static urls RewriteCond %{REQUEST_URI}
^IMG.*$ RewriteRule ^IMG-(.+)_w(.+)_h(.+)_f(.+).jpg$
imgcpu\?src=$1\.jpg&w=$2&h=$3&f=$4 [L] RewriteRule
^IMG-(.+)_w(.+)_q(.+).jpg$ imgcpu\?src=$1\.jpg&w=$2&q=$3 [L]
share|improve this question Because it's lazy! Nyuk nyuk nyuk.
–  mfinni Dec 15 '10 at 19:14  2 Answers 2  up vote 1 down vote
accepted  The RewriteCond is actually processed after the
RewriteRule matches! Here's a diagram from the Apache docs:
Rewrite Control Flow  shar