The situation is that you have an old domain with a website or even various websites and sub-domains. You have moved all your files to another server or web address but you don’t want to lose the traffic from all the people who have bookmarked or link to you.
In fact, you want ALL old links to go to the exact same place on the new server. This is how you redirect everything all in one go permanently with the htaccess file.
Creat a .htaccess file (don’t forget the DOT before it, it’s hidden from public view)
Upload it to the root of your website, usually where your index.html or index.php files are and you are all set. Google some of your old links and see where they take you. It should be to the same page on the new website.
One thing to remember is this will only work on a Linux Apache webserver which allows the Mod Rewrite function.
PS: If you are on a Windows Server, try Googling the html redirect method.
That’s it, now all incoming links from any of the old posts/pages will be forwarded to the new site 🙂