Permanent & temporary Apache .htaccess redirect (301 & 302)

This .htaccess directive will redirect visitors to the homepage on the new site, the path gets left alone. So someone visiting http://my-old-site.com/some/deep/page/ will get redirected to http://my-new-site.com/some/deep/page/

Permanent (301) vs Temporary (302) redirect

If you want the redirect to be temporary, you can use a 302 status code instead of 301. This has the side effect that existing pages keep their ranking in search engines better when you remove the redirect later.

Redirecting specific pages

Redirect a specific file to a subfolder

Redirect a moved/removed file to a new location: