I have a centos 6.5 web server running 2 websites off 1 ip address by using virtual hosts.
domain1.com and domain2.com - both hosted on the same web server above.
I need to redirect about 40 pages from domain1 to domain2, "for example":
domain1.com/page1 -> domain2.com/new-page-1 domain1.com/welcomepage -> domain2.com/new-welcome-page domain1.com/johnsmith -> domain2.com/elvis domain1.com/test -> domain2.com/production
*Notice that the pages I am redirecting are not under the same structure/name, they go to a completely different structure/name.
Can anyone suggest what I can/need to do to accomplish this task?
EDIT #1 I tried doing this through the VirtualHost section in my httpd.conf file. See below for my entries.
<VirtualHost *:80> ServerName domain1.com ServerAlias www.domain1.com RedirectPermanent / http://www.domain2.com/page12345/ </VirtualHost> <VirtualHost *:80> ServerName domain1.com ServerAlias www.domain1.com RedirectPermanent /AboutUs/Founders http://www.domain2.com/about-us-founders/ </VirtualHost>
In the above two entries, only the first one is working right and redirecting correctly. The second one is redirecting to: http://www.domain2.com/page12345/AboutUs/Founders Any ideas?