.htaccess is a file that tells the server how to handle certain things like security, error messages and, most importantly for us, redirection. The mod_rewrite module lets you “rewrite” URLs. It’s hosted on your web server so you won’t need to download or install anything. This is the preferred way to redirect your site or pages to your new domain name without losing valuable ranking or back links.
To start, make sure your new domain is properly directed to your hosting account. Upload your files from your old domain to the new one exactly as they appeared on the old domain. Now it’s time to make your .htaccess file. If you already have one on your new server, name it .htaccessBACKUP. Don’t delete it in case you need to restore the old settings for any reason.
Open Notepad by going to Start > Accessories > Notepad or use another simple text editor of your choice. Don’t use Microsoft Word or another word processing program though – they will automatically add an extension to the filename like .doc – which is what we don’t want.
In this new file, copy and paste the following:
RewriteRule ^(.*)$ http://www.yournewdomain.com/$1 [R=301,L]
Replace “yournewdomain.com” with your actual new domain name. Then save the file as:
Ensure it doesn’t have an extension (like .txt) – you can do this by choosing “All Files” in the drop-down menu.
Once you save the file, upload it to your root directory for your old domain name. Try it out by typing in your old domain in your browser. You should immediately be directed to the new site. The old domain name will still show in the address bar. To make sure you’re browsing the new site and not the old one, just right-click on an image and choose Properties. The full image URL should be displayed with the new site URL.
_________________virtual offices limerick [nofollow]