• We recently launched our new website and blog at http://www.partycentersoftware.com. We had an old blog at blog.partycentersoftware.com and created the following code for the rewrite in htaccess:

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/$ [OR]
    RewriteCond %{REQUEST_URI} ^/index.php$
    RewriteRule (.*) http://www.partycentersoftware.com/blog [R=301,L]
    RewriteRule (.*) http://www.partycentersoftware.com/$1 [R=301,L]

    This accomplished our initial goal, which was to 301 redirect the old blog homepage (blog.partycentersoftware.com) to the new blog (partycentersoftware.com/blog/). And all individual posts would be redirected as follows: from blog.partycentersoftware.com/2014/02/05/reduce-paper-product-waste/ to http://www.partycentersoftware.com/2014/02/05/reduce-paper-product-waste/.

    All of that works, however I recently realized an issue when looking at some crawl errors on Webmaster tools. Our tags and categories were all adjusted on the new site, so now any post from the old blog that started with blog.partycentersoftware.com/tag/, blog.partycentersoftware.com/category/, or blog.partycentersoftware.com/author/ are giving 404 errors.

    We want to keep the individual posts forwarding as is because that’s working. Is there a way to do that, and then simply take any uri that starts with /tag/, /category/, and /author/ from the old blog and forward each of those to the new blog homepage at http://www.partycentersoftware.com/blog/

  • The topic ‘Rewrite in htaccess’ is closed to new replies.