[ale] redirect website

Jim Popovitch jimpop at yahoo.com
Fri Sep 15 20:01:42 EDT 2006


On Fri, 2006-09-15 at 19:31 -0400, James P. Kinney III wrote:
> My brain has turned to swiss cheese today.
> 
> I have a domain foo.com hosted on machine with IP address 1.2.3.4
> It has a website www.foo.com as an alias of foo.com
> I want to create a subdomain webmail.foo.com and have it get redirected
> to www.foo.com/webmail or foo.com/webmail
> 
> I set up an alias so the server would pick it up. Then a Redirect which
> didn't pick it up. Then a RedirectMatch which also didn't pick it up.
> 
> I can create a new virtualhost of webmail.foo.com but it seems like the
> wrong way to do this.
> 
> How should the server alias and redirect and alias be done to capture
> the chunk in front of the foo.com and remove it and stick it on the end
> of the domain?

In order to do this you need a VirtualHost section setup for
webmail.foo.com.  In that section add a RedirectMatch like this:

  RedirectMatch ^/(.*) http://www.foo.com/webmail/$1

hth,

-Jim P.




More information about the Ale mailing list