Drupal theme IMG folder rewrite rule from vhosts conf file? I am wondering if it is possible to create a rewrite rule in my vhosts config file for a site to remap the location of the images folder in the theme directory.

The scenario is that I don't want to create a whole new theme for on region of a multilingual site but given that the URL is different for this region I would like to remap for example:

sites/all/themes/theme/img/(.*) to sites/all/themes/theme/img_other/$1

I have tried some variations ion what I have just put there as the example but nothing is working as yet.

Any help would be much appreciated.

Thanks
I would add a RewriteRule to the .htaccess file rather than a vhosts config; it's portable in the event of a server change and it doesn't require an Apache reload if you need to update redirect rules.

For your scenario this line is all you need in your .htaccess file:

RewriteRule ^sites/all/themes/theme/img/(.*)$ /sites/all/themes/theme/img_other/$1 [NC,L,R=301]


If you're using a vhosts conf because it's a multi-domain site (e.g. en.example.com, de.example.com, etc.) then you can add a RewriteCond in front of it to match the domain you need to apply it to:

RewriteCond %{HTTP_HOST} ^de.example.com$ [NC]
RewriteRule ^sites/all/themes/theme/img/(.*)$ /sites/all/themes/theme/img_other/$1 [NC,L,R=301]