Help with mod_rewrite domain handling rules



I have several domains that reach one Apache server.

I'd like to redirect based on the hostname used to reach the site

So given domain1.com, domain2.com, and domain3.com

all reach domain.com,

domain1.com should get re-written to www.domain.com/domain1_stuff
domain2.com should get re-written to www.domain.com/domain2_stuff
domain3.com should get re-written to www.domain.com/domain3_stuff

And I would like to force the www. for all

Thanks!

.



Relevant Pages

  • circumventing default route through loopback
    ... a simple and PROPER solution -- please help! ... The problem is, I have set up my Apache server, ... from home have proven unreliable from remote. ... my ISP, but it is too small, so I redirect ...
    (freebsd-net)
  • Re: Redirect IP to hostname
    ... computer will then redirect requests for that IP to a host name (at ... computer that has the hosts file). ... In your original post you stated you wanted to redirect an IP to a Hostname. ... IP (your ISP). ...
    (microsoft.public.win2000.general)
  • How to pass user name and password to Apache server.
    ... redirect them to download some files that reside on an Apache server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: disable port 80 when using SSL
    ... this one up as a redirect and enter in the HTTPS address. ... I would not expect any problem running multiple web sites with the same hostname header if they are on multiple different IP / port combinations. ...
    (microsoft.public.inetserver.iis)
  • domain name redirect on OS X
    ... I have OS X on my imac. ... I'm testing a website I am building using the apache server, ... I need my computer to redirect a domain back to itself. ...
    (comp.sys.mac.system)