I am migrating a website from one platform to another, and in that process, I'm getting rid of the old domain name. There is no direct relation between the paths on the old and new website, and therefore, I want to redirect all old paths to the new websites' front page: I.e. olddomain.example/any_path should redirect to the front page of newdomain.example. I am aware of the SEO consequences of this.
My current solution is to use the RedirectPermanent directive, so that my .htaccess
in the domain's root directory contains:
RedirectPermanent / https://newdomain.example/
How do I achieve that any path on olddomain.example (e.g. olddomain.example/any_path) is redirected to the front page (and not the corresponding path) of newdomain.example?