Forums

Old URL to New (7 posts)

  1. chandlerwhite
    Member
    Posted 2 years ago #

    I started this issue yesterday, but would like to re-word. I've been using a URL on my blog for four months now. I needed to broaden my market so I'm going to rename the blog and use a new URL, while we're still very young. Obviously, I don't want to lose those who have been visiting using the old URL. What's the most efficient way of accomplishing this? Thank You...

  2. vangrog
    Member
    Posted 2 years ago #

    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

  3. chandlerwhite
    Member
    Posted 2 years ago #

    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.

  4. vangrog
    Member
    Posted 2 years ago #

    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

  5. vangrog
    Member
    Posted 2 years ago #

    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).

  6. chandlerwhite
    Member
    Posted 2 years ago #

    What tremendous help. Thank you so much!

  7. vangrog
    Member
    Posted 2 years ago #

    np.. ;o]

    if something doesnt work, tell it here...

    cheers

Topic Closed

This topic has been closed to new replies.

About this Topic