Forum Moderators: phranque
I have 2 folders with jpgs. When a file in the fist one does not exist, I'd like to make a rewrite to the other folder. I tried this very simple rule:
RewriteRule ^folder1/([^/]*).jpg folder2/$1.jpg
I thought it would work because it usually did when it comes to html files. However, this time what it does it rewrite the jpgs from the first folder no matter what, which results in 404 errors.
Any ideas?
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} !-f
For more information, see the RewriteCond directive in the mod_rewrite documentation.
Jim