Hello,
I found the following post on your site that describes how to redirect a subfolder from domain A to the root of domain B
I have already done exactly this and it works properly, but I would like to take it one step further and get rid of Machine A altogether. i.e. This solutions assumes that Machine A / Domain A / Webserver A is sticking around (this is where the redirect rules are).
To summarize:
1). I have an Apache Webserver running on Machine A with a site that looks like http://domain-A/subfolder/…
2). I have another Apache Webserver running on Machine B with a site that looks like http://domain-B/…
The 301 redirect on Machine A looks like:
RewriteEngine on
Redirect 301 /subfolder/ http://Domain-B/
Everything works great.
Q. How to I move these rules to Machine B / Webserver B so that I can get rid of Machine A altogether?
–
Additional info:
I. Machine B is the exact same site with a new domain name (and without the subfolder). The only reason I’ve kept Machine A around is to handle the redirects. There are still quite a few links out there that still point to http://Domain-A/subfolder/… and I want them to keep working.
II. Machine A / Webserver A was setup a long time ago based on Dynamic DNS. So, currently I have dynDNS domain name pointed to the dynamic IP for this host.
III. Machine B / Webserver B is a proper Domain Name (no dynamic DNS) with a Fixed IP.
–
So… what I’m hoping I can do is:
1). In my Dynamic DNS configuration for http://Domain-A, change the IP address to the Fixed IP address for Domain B (i.e. all traffic to http://Domain-A… will now be directed to Machine B)
2). Add rules to .htaccess on Machine B / Webserver B so that URLs that look like http://Domain-A/subfolder/… are redirected to http://Domain-B/…
Is this possible? Any help would be appreciated.
Thanks,
Mike.