Recently we migrated an entire development/internal domain to fully qualified external domain name. We have already updated the DNS for both the old site to point to our redirect server and new site domain location. The problem we have now is that we cannot redirect from the old subdomain.domain.com name to the new subdomain.newdomain.com one.
We are running Apache 1.3.37 with mod_alias and mod_rewrite modules enabled.
This is what is needed to happen: ourcity.domain.com --> ourcity.newdomain.com
I wrote the following out as per our virthosts-redirect.conf file on the redirect server:
<VirtualHost redirect.ourdomain.com>
ServerName domain.com
ServerAlias
www.domain.com
ServerAlias *.domain.com
CustomLog /dev/null common
ErrorLog /dev/null
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC]
RewriteRule ^(.*)$
http://%1.newdomain.com [L]
</VirtualHost>
Is there a way to divert all subdomain names from the old site and pass it on the the new site keeping the subdomain intact?
-- Michael