WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 301 entire site but send home page to new structure (2 posts)

  1. Kevin
    Member
    Posted 1 year ago #

    I am redirecting my old WordPress url to my new WordPress url, using a 301

    Redirect 301 / http://www.newsite.com/

    I want all pages and posts to redirect, but the home page to be at a different URL structure. Using the 301 all the posts and pages work fine, but I want the home page to go to newsite.com/blog instead of newsite.com. I'm racking my brain trying to get this done. Any help is appreciated. Thanks!

  2. Kevin
    Member
    Posted 1 year ago #

    Solution for those still looking...

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.)?oldsite\.com$ [NC]
    RewriteRule ^(.+)$ http://www.newsite.com/$1 [R=301,QSA,L]
    Redirect 301 /index.php http://www.newsite.com/blog

Topic Closed

This topic has been closed to new replies.

About this Topic