[eluser]TheFuzzy0ne[/eluser]
Code:
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9_-]+)\.domain\.com [NC]
RewriteRule ^/images/(.*)$ images/%1/$1 [L]
I think the problem is a missing forward slash in the regex. I'm still reading, but I'm hoping this might fix your problem. You might need to try adding a forward slash to the rewritten URL too:
Code:
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9_-]+)\.domain\.com [NC]
RewriteRule ^/images/(.*)$ /images/%1/$1 [L]