Hello, this is my first post here. I did search the forums trying to find an answer, but nothing seemed to allay my fears of what I am about to do.
I am attempting to rebrand my sister's website to a new brand new domain name. But there is only the one docroot with all the pages. I want to create 301 redirects for each page to the new domain, but the problem is that I think if I change the .htaccess file in the docroot to redirect
(say /home/index.php to
https://www.newdomain.com/home/index.php )
then that would send the site into weird a loop since it would just point back at the same docroot.
So.... My thought is that I need to create a brand new docroot folder with an .htaccess file containing all of my 301 redirects to the pages on the new domain. I will point the old website domain at that new docroot, and I will point the new domain at the old docroot.
Does that sound like the right approach?
All of the directory structure and pages under the docroot are the same as the old site. The site in question is an OpenCart site (PHP pages with parameters on the URLs).
So URLs are either like
https://www.olddomain.com/CategoryName
or
https://www.olddomain.com/index.php?route=account/login
My ultimate goal is to tell all search engines that the domain has changed permanently, and to also redirect the customers to the new store (hopefully to the same page they were trying to hit from Google). And hopefully not loose all the search engine stats accumulated by Google.
Is the RedirectPermanent the best directive for this?
Thanks for any help you can give,
Mark