hi, i'm trying to get the following to work in my .htaccess ... this regex thing is making my brain bleed 8-)
RewriteRule (.*) /%(HTTP_HOST)/$1
i have 3 domains all aliased to the same virtual server. i would like the rewriterule to direct apache to the proper directory and use the files in it without having to write a new rule for each domain... the regex rule should work to any depth of subdirs on any kind of file... example mappings would be like...
http://domain1.com
http://domain2.com/testdir1
http://domain3.com/testdir2/file.html
would go lookup files in
/var/www/html/domain1.com/
/var/www/html/domain2.com/testdir1
/var/www/html/domain3.com/testdir2/file.html
any assistance would be very much appreciated
happy new year!
bill bush
RewriteRule (.*) /%(HTTP_HOST)/$1
i have 3 domains all aliased to the same virtual server. i would like the rewriterule to direct apache to the proper directory and use the files in it without having to write a new rule for each domain... the regex rule should work to any depth of subdirs on any kind of file... example mappings would be like...
http://domain1.com
http://domain2.com/testdir1
http://domain3.com/testdir2/file.html
would go lookup files in
/var/www/html/domain1.com/
/var/www/html/domain2.com/testdir1
/var/www/html/domain3.com/testdir2/file.html
any assistance would be very much appreciated
happy new year!
bill bush