The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Moving WordPress to the root directory; how to redirect old URLs

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #39114

    A few years ago I started a website with WP installed in a subdirectory (let’s call it ‘/folder’) to keep the root clean. Now I want to apply the following tutorial: Giving WordPress Its Own Directory – Using a pre-existing subdirectory install. It’s easy to apply but I don’t want to lose my Google ranking. So how can I redirect the URLs with ‘/folder’ automatically to the root?
    For example: should redirect to the new URL, should redirect to the new URL et cetera.

    I guess I can fix it in the .htaccess file with 301 redirects, but after some research I still haven’t found a working solution.


    I’ve found this article on Perishable Press, with the following solution:
    RedirectMatch 301 ^/blog/$ http://domain.tld/

    It works for posts and pages, but not for the archive pages of categories, authors, and tags.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.