• I’m moving my blog to a new server, and I’ve decided to pull it out of its /blog/ directory to the root.

    In doing so, however, I’m going to lose all of my permalinks (and with it a ton of people who have linked to that structure. Everything after /blog/ is staying the same; so I attempted a rewriterule as such:

    RewriteRule ^/blog/(.*)$ /$1 [L]

    But it doesn’t solve the issue since the original wordpress permalink structure is most likely interfering with it. What do I need to do in .htaccess to get my permalinks working while moving my blog software down one directory?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Try RewriteRule ^/blog/(.*)$ /$1 [R,L] and make sure that you put it in the .htaccess above the WordPress rules, not after them. Rules are processed top to bottom, obviously.

    Thread Starter eston

    (@eston)

    Nope, that doesn’t seem to work either. I just get a 404 page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Advanced mod_rewrite permalink preservation’ is closed to new replies.