• Thanks in advance for any help!

    I will be changing servers soon. On the current server, blog entries are in domain.tld/blog/postname format.

    On the new server, blog entries will be in the domain.tld/postname format. However, the main blog page is housed at domain.tld/blog.

    So, I need to exclude domain.tld/blog from a rewrite, but then rewrite serps that go to domain.tld/blog/postname to domain.tld/postname because I will have old traffic coming to those pages.

    I hope this makes sense.

Viewing 3 replies - 1 through 3 (of 3 total)
  • On the current server, blog entries [show as being in a sub-directory].

    On the new server, blog entries will [not show as being in a sub-directory].

    Are you saying you will be editing your database either directly or indirectly beforehand in order to make that change before changing servers? Then, where will you installation actually be located at the new server?

    In any case and separate from that, here is the most-comprehensive info I have ever found in relation to these kinds of changes and SEO:
    https://www.internetmarketingninjas.com/blog/search-engine-optimization/301-redirects/

    Thread Starter cq

    (@cq)

    i have the site already staged. on the old server, the blog was put in a subdirectory, /blog. hence, all blog posts have domain.tld/blog/post-name as the url.

    i am using wordpress as a static site for the new server and have blog entries listed on a page /blog/. all blog posts show for that page. however, when you click on the blog post titles, the url becomes domain.tld/postname.

    all im wanting to do is redirect search requests from the old domain.tld/blog/postname format to the new domain.tld/postname format for the url.

    ***the caveat is that i dont want to redirect domain.tld/blog/ on the new server, since that is the page that list all the blog posts.

    Thread Starter cq

    (@cq)

    oh forget it.

    i got so focused on finding a solution, i didn’t think about simply changing permalinks on the new server to include the /blog/ in the url.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.htaccess exclude subdirectory but not subdirectory contents’ is closed to new replies.