Support » Fixing WordPress » How to set htaccess correctly when I move my blog to new directory?

  • WPChina


    My blog is currently located in the root of my site at but I want to move it to I understand how to move it into the new directory and how to reset the links on the blog to show the new directory of /blog/ but I still have a problem:

    How can I setup an htaccess so that anybody coming to the old link in the root at can now go to ?

    Thank you for your guidance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • WPChina


    OK, I set this up and it works:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)$$1 [R=301L]]

    However, I still have one very important problem to work out. Now that the old blog links are pointing to the new blog links, I also want to do something unorthodox. I have another directory that I want to make the main section of my entire website, and it currently resides at

    I want to make people coming to to instead be forced to go to

    So do you follow me on all this? I want to do 2 things, and the first thing is already working:
    1) point to
    2) If anybody goes directly to (the old homepage of the entire site), they will instead go to

    For the second idea above, I tried this code:

    Redirect 301 /index.php

    If I use that ALONE (without the RewriteRule code I mentioned at the very beginning), it works fine. However when I use the code for #1 and #2, only the #1 code works and the #2 code doesn’t work at all…

    Any ideas?



    Sorry to bounce, but this is a headache to figure out. I’m sure it’s a matter of 1-2 lines of code in htaccess, but the more I ply around with it, the more combinations I find that continue to ruffle my feathers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to set htaccess correctly when I move my blog to new directory?’ is closed to new replies.