We have recently deployed new site as the old site was giving us a lot of problems and its a news site. We have changed the old site to old.domain.com and made the new site as domain.com. Before people used to visit old site on domain.com which is now shifted to old.doamin.com. To shift the content from old site to new is not possible.The site was 4 years old and a lot of content were shared from the site like domain.com/xyz/abc but when now people come to visit those old shared link they will be directed to new site domain.com/xyx/abc where the content will not be found as the content is now shifted to old.domain.com/xyz/abc. So I want to achieve redirection so that when the people click old shared link domain.com/xyz/abc they will be redirected to old.domain.com/xyz/abc only changing domain so that the content can be displyed from old site. Site is hosted in apachel in cpanel.
I have tried the following in htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*) https://old.domain.com/$1 [P]
</IfModule>
P.S I am not a programmer but I am trying to achieve this for my company.