• 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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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:
    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    Thread Starter bdp

    (@bdp)

    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.

    hi,

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

    thank you,
    webee

    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.

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

    Rich.
    BlogRodent

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

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

    redirect /blog https://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.

    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,
    https://www.webee.ro is a design blog

    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…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Help relocating an established blog and redirecting old links’ is closed to new replies.