On Monday, January 27, 2003, at 10:51 AM, Gilles Lenfant wrote:
With the rewritelog, I can see that the regular expression searches matches in the *path* and not to the *URL* (as stated in mod_rewrite doc). Such it wont pass anything to the expected $1 and $2 :( I got to find out another way to virtualhost dynamically.
Look into RewriteCond - it supports conditional based upon the host. In you case, something like: RewriteCond {HTTP_HOST} ^nick1.* RewriteRule ^(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/nick1/ VirtualHostRoot/$1 [P,L] RewriteCond {HTTP_HOST} ^nick2.* RewriteRule ^(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/nick2/ VirtualHostRoot/$1 [P,L] This way, all your nick1.mydomain.com requests get rewritten one way, and your nick2.mydomain.com requests get rewritten a different way. ___/ / __/ / ____/ Ed Leafe http://leafe.com/ http://opentech.leafe.com