Not technically php - but I'm guessing a lot of people here will still be able to code modrewrite better than me!
I'm simply after a rewrite setup that takes:
[INDENT]/WHATEVER.jpg[/INDENT]
and changes it to
[INDENT]/old-images/WHATEVER.jpg[/INDENT]
I've actually managed this already with this code:
RewriteEngine On
RewriteBase /
# Stop Redirect Loop
RewriteCond %{REQUEST_URI} !old-images/
RewriteRule ^(.*\.jpg)$ old-images/$1 [L,R]
However this also matches:
[INDENT]/FOLDER/SUBFOLDER/etc/WHATEVER.jpg[/INDENT]
and rewrites that too. I really only want it to match .jpg files in the root of the website. Anyone know how to solve this?