httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: Vhosting problem
Date Mon, 17 Dec 2001 09:12:35 GMT
Kopetzky Robin CIV AFSC/SEP wrote:
> Hi, again!
>         We are using Apache here at work and the base has decided in their
> infinite wisdom, to change the URL that we are using for our server. Now, we
> are using now: and they are changing the url to
> How do we setup a virtual host so that Apache will
> still respond to the original url AND the new url???

I find the cleanest way to do this is to use the new URL in the main VH
and set up a small VH with the old URL. Then use a "RedirectMatch" to
move users to the new URL. The advantage of the RedirectMatch is that
the URL in the browser changes thus educating users that you have moved.

NameVirtualHost ip-addr:80

# VH for old address
<VirtualHost ip-addr:80>
  RedirectMatch permanent (.*)$1

# Main VH
<VirtualHost ip-addr:80>
  DocumentRoot <main-content-directory>


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message