I am using Apache 2.4.47 Win64 from Xampp. Please suggest:
1) Which file in Apache to edit
2) And what to add/include in that file to accomplish the following.
A website e.g. https://www.old.com does NOT exist anymore (shut down/inactive).
Any user who wants to go to website https://www.old.com (because the old website might be bookmarked) will now be redirected to a new (and active) website, which is https://www.new.com
If a user has bookmarked the old website, or any sub-pages in the old website (e.g. bookmarked https://www.old.com/page1) will be just re-directed to the main entry page of https://www.new.com (or to https://www.new.com/page1)
The old website was cloned to a new domain (all the content and sub-URLs are the same). And after cloning, the old website was shut down and the new website was made active. However, the prior users have a bookmark of the old website and I would like them to get redirected to the new website, whenever they hit the URL of the old website. It is not possible to notify the users as the list of the users is not known. Redirect (permanent) will work the best.
Redirecting any page of the old website to the mapping page in the new website will be ideal, as:
https://www.old.com/? to https://www.new.com/?
If not, redirecting the context root of a.com to b.com will be acceptable.
Redirecting https://www.old.com/? to https://www.new.com/ will also be acceptable.