I'm trying to have the server lookup files/images in a different folder, than typed in the address bar.

For example, if somebody types
http://my-domain.com/images/test.jpg
the server should look for the image in:
/images/my-domain.com/test.jpg and not /images/test.jpg as it normally would.

I've managed to get the domain-name into the RewriteRule, but it still isn't working:
RewriteRule ^images/(.*) images/%{HTTP_HOST}/$1 [L]

This WORKS:
RewriteRule ^images/(.*) images/%{HTTP_HOST}/test.jpg [L]
But here the image, test.jpg, is hard-coded which it of course shouldn't be.

Can anybody help? And does it make any sense?