I have directories called v1 and v2. So the user can go to http://example.com/v1 or http://example.com/v2.
v2 has a copy of index.html from v1, and some css files that were never in v1.
v1 has an images directory with hundreds of images in.
If the user goes to v2/images they rightfully get a 404. How do I redirect anything that is not found in the v2 directory to the v1 directory?
Eg:
http://example.com/v2/someotherfile.html -> http://example.com/v1/someotherfile.html
http://example.com/v2/images/base.jpg -> http://example.com/v1/images/base.jpg
http://example.com/v2/index.html //does not redirect
(and if it doesn't exist in v1 or v2 it should go to the ErrorDocument for 404 defined in .htaccess?)
Also by user I mean anything, ajax the src of img and script tags, etc.