httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
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: mom.saia.af.mil and they are changing the url to
> mom.kirtland.af.mil. 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.
E.g.

NameVirtualHost ip-addr:80

# VH for old address
<VirtualHost ip-addr:80>
  ServerName mom.saia.af.mil
  RedirectMatch permanent (.*) http://mom.kirtland.af.mil$1
</Virtualhost>

# Main VH
<VirtualHost ip-addr:80>
  ServerName mom.kirtland.af.mil
  DocumentRoot <main-content-directory>
  etc...
</Virtualhost>

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message