Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here is my htaccess:

RewriteCond     %{HTTP_HOST}                                 ^(?:www\.)?(.+?)\.imvu-e\.com$
RewriteCond     /var/imvu/products/ht/clients/%1/            -d
RewriteRule     ^(.+)                                        %{HTTP_HOST}$1
RewriteRule     ^(?:www\.)?([^.]+?)\.imvu-e\.com/(.*)        /var/www/imvu/products/ht/clients/$1/$2 [L]

I would like

anything.imvu-e.com to redirect to the files at /var/imvu/products/ht/clients/anything/

Thus http://anything.imvu-e.com/woot.php?var=4 goes to /var/imvu/products/ht/clients/anything/woot.php sending it var=4

The way it is now to access it would be http://www.imvu-e.com/products/ht/clients/anything/woot.php?var=4

share|improve this question

1 Answer 1

up vote 2 down vote accepted

How about a nice VirtualDocumentRoot instead?

VirtualDocumentRoot /var/imvu/products/ht/clients/%-3
share|improve this answer
This seems to mess up my relative links where I use ../ in the URL or for images. Id rather them type in anything.imvu-e.com and be redirected to the long URL –  ParoX Jul 16 '12 at 8:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.