WordPress.org

Ready to get started?Download WordPress

Forums

Help relocating an established blog and redirecting old links (8 posts)

  1. bdp
    Member
    Posted 7 years ago #

    My blog is currently in a subsidiary directory: http:/ozpolitics.info/blog/

    I want to move it to the main page http:/ozpolitics.info/, but I also want to set up (if possible) a .htaccess file, so that if anyone goes to my old blog links, they end up in the right place. Any thoughts on how I do this?

  2. Samuel B
    moderator
    Posted 7 years ago #

    No need for all of that. Just modify the WP root index.php and move it and your .htaccess to root.
    This has the advantage of keeping all of your WP files in a tidy sub folder and still having your site at the root.
    Directions:
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

  3. bdp
    Member
    Posted 7 years ago #

    Sam, correct me if I am wrong, but that appraoch will not allow both the old permalinks and the new permalinks to work.

    Eg.
    I want http:/ozpolitics.info/blog/story and http:/ozpolitics.info/story and http:/ozpolitics.info/blog/?p=nnn and http:/ozpolitics.info/?p=nnn all to work -- old and new alike.

    Essentially, in the new world, I would want to map http:/ozpolitics.info/blog/story --> http:/ozpolitics.info/story; and http:/ozpolitics.info/blog/?p=nnn --> http:/ozpolitics.info/?p=nnn (and so on).

    I imagine I can do the mapping in the .htaccess file. My problem is that I do not know how.

  4. webee
    Member
    Posted 7 years ago #

    hi,

    i'm also interested in this topic.
    if you find the solution for this, please share it.

    thank you,
    webee

  5. rtatum
    Member
    Posted 7 years ago #

    Bryan, sorry, this is off-topic, but I hope you're still subscribing to this feed.

    I cannot access your site, apparently because ozpolitics.info currently has no A records since your hosting provider moved you to a new server. There is nothing listed on the root servers (info) for this at all right now.

    As a bonus, I'm sure this relieved your traffic woes.

    http://www.dnsstuff.com/tools/traversal.ch?domain=ozpolitics.info&type=A

    Rich.
    BlogRodent

  6. iamww
    Member
    Posted 7 years ago #

    I used an .htaccess file to do this a while back. It allowed me to direct everything from http://iamww.com/blog/story-name to http://iamww.com/story-name

    I just created a .htaccess file with the following line of code inside.

    redirect /blog http://ozpolitics.info

    I then uploaded that file to the iamww.com/blog/ directory. I was able to delete everything else in the blog directoy and it worked like a charm.

    Hope this helps.

  7. webee
    Member
    Posted 7 years ago #

    thanks!

    in the mean time i've found a plugin that redirects urls like www. domain.com/ directory/ postname to
    www. domain.com/ postname

    even so... it does not redirects urls like
    www. domain.com/ directory/ postname/ feed

    do you think this will work?

    thanks,
    http://www.webee.ro is a design blog

  8. veroninja
    Member
    Posted 6 years ago #

    thanks!

    in the mean time i've found a plugin that redirects urls like www. domain.com/ directory/ postname to
    www. domain.com/ postname

    even so... it does not redirects urls like
    www. domain.com/ directory/ postname/ feed

    do you think this will work?

    This worked like a charm for me :)

    Better to use a plugin than to blabla .htaccess files I don't even understand anyway...

Topic Closed

This topic has been closed to new replies.

About this Topic