Using mod.htaccess mod rewrite, I would like to rewrite the URL, check if this file exists, and if it does not rewrite to another URL again, using the portion of the original URL that was deleted during the first rewrite.
For example, if the source url is
/images/3001/zebra.jpg
I would like to check if the file /images/cached/zebra.jpg exists and serve it if it exists.
And if not, I would like to rewrite in /image.php?id=3001
Thanks a lot, Phil
source share