Content Migration - Redirect URL with same hostname

Avatar

Avatar

sivas13911460

Avatar

sivas13911460

sivas13911460

28-12-2020

Hi All,

 

We are migrating content from one server to other server with below requirement.

1. We have two sites:

www.sitea.com/home/<pagename>.html

www.siteb.com/store/<pagename>.html

 

Content structure on Server A :  /content/siteA/home/*

Site name is :   www.sitea.com/home/abc.html

 

Content structure on Server B :  /content/siteB/store/*

 

Now we are planning to move some of the content  pages from Server A  "/content/siteA/home/*"  to Server B under store "/content/siteB/store/*". but we want to keep the url is same.

 

For example: we have page called 'abc' under /content/siteA/home/abc on Server A and this 'abc' page will be moved to server B under '/content/siteB/store/abc

Current URL of page is ' www.sitea.com/home/abc.html' so we want to keep the url remains same even though we move the page to Server B. Is this possible by writing some dispatcher rules? Please advise.

 

 

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Andrei_Dantsou

Avatar

Andrei_Dantsou

Andrei_Dantsou

28-12-2020

Hello @sivas13911460,

You can use either the RewriteRule directive with the P flag (https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p) or the ProxyPass directive (https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass).
The ProxyPass, however, is preferable from the performance point of view. 

Regards

Answers (1)

Answers (1)

Avatar

Avatar

sivas13911460

Avatar

sivas13911460

sivas13911460

28-12-2020

Hi Andrei,

 

I've added below in my virtual hosts:
ProxyPreserveHost Off
ProxyPass "/store/" "www.siteb.com/home/"
ProxyPassReverse "/store/" "www.siteb.com/home/"

 

and when i hit the page : www.sitea.com/store/abc.html  it says:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.