Re: Rewrite: modify http_host for many subdomains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pete Nesbitt wrote:
Hi,
We are changing one of our domain names which has about 150 host/subdomains. Apache version is 2.0.52 on RHEL4

Current http_host's would look something like this:
service1.old-domain.com
service2.old-domain.com
host1.subdom1.old-domain.com
etc...

I need to make them read:
service1.new-domain.com
service2.new-domain.com
host1.subdom1.new-domain.com

From what I can see I would need to add a separate rewrite set for each host within the old domain:
 RewriteCond %{HTTP_HOST} ^service1\.old-domain\.com$ [NC]

Any reason why you don't just use "ServerAlias" ?

<VirtualHost *:80>
  ServerName service1.new-domain.com
  ServerAlias service1.old_domain.com
...
</VirtualHost>

As long as "service1.new-domain.com" and "service1.old-domain.com" resolve to the same IP address in DNS, that should be all that's required for the migration.



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux