I know this is a little offtopic from PHP but there's gotta be some apache gurus here.
My website is rather big and spans many many pages. All the pages are dynamically generated via php/mysql and are dumped in the home directory (no .php files in physical subdirectories).
Thus, all my images are called as such:
<img src="images/IMAGE_NAME.jpg">
(notice the lack of a header forward slash).
I'm OK at mod_rewrite, so Ive been changing my urls from like
myDomain.com/user.php?u=USERNAME => myDomain.com/users/username
to make things more coherent with a few rules.
HOWEVER, when the /users/username URL is maintained, the image paths do not work of course cause its looking for /users/username/images/IMAGE_NAME.jpg
how can I have a few rewriteCond and rewriteRules that will basically take all image requests from my own server to itself and rewrite the src to include http://www.myDomain.com/$1/$2(.jpg|.gif|.png)
Thanks...