Add this into the .htaccess file in your site root:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.YourOldSite.com$ [OR]
RewriteCond %{HTTP_HOST} ^YourOldSite.com$
RewriteRule ^(.*)$ http://YourNewSite.com/$ [R=301,L]
Course, replace YourOldSite and YourNewSite with your old/new website url… And you have to keep both domains at least for a while, till the new URL spreads and the old one gets forgotten…
Those who try to reach your old url will be redirected to your new one…
cheers
Thank you. One last matter. The content will be identical, as the old blog will go bye-bye after transition. Is there a simple way of copying everything from the old to the new? I’ve already set up hosting for the new one with same host.
Yes,
If you have access to your phpMyAdmin, go there and export your database.
Open your database with a notepad. Use search and replace and ask it to search for http://www.youroldsite.com and replace it for http://www.yournewsite.com . Save it. Import it on the new site phpMyAdmin
Cheers
PS.: if you are gonna keep both sites/blogs, add the .htaccess rules into the root of your old site/blog. If you are gonna run just the new site/blog, add it to its root (but get sure you add the old domain to your new site host configuration as well, and point its DNS to there — if you dont know how to do it, ask help from your host and they’ll do it for you).
What tremendous help. Thank you so much!
np.. ;o]
if something doesnt work, tell it here…
cheers