Forums

Redirecting old site permalink? (2 posts)

  1. Tack
    Member
    Posted 6 years ago #

    Hi, used to host my blog at http://www.mydomain.com/blog
    Now hosted at http://www.mydomain.com/
    Transfer went well !

    BUT I want old pretty permalinks to find their own posts..
    essentially
    http://www.mydomain.com/blog/2005/22/11/oldpost
    to get to / redirect to
    http://www.mydomain.com/2005/22/11/oldpost

    I figured I could do this with a rewrite in .htaccess - but so far no go...
    Anyone know the correct rules, AND the correct location for THIS rewrite? Add it to (currently empty) /blog directory OR to the wordpress .htaccess in the root ?
    Tried multiple times so far - no go :-(
    Thanks

    ps apache 1.3.34 fwiw

  2. Tack
    Member
    Posted 6 years ago #

    FWIW
    this ended up working.
    RewriteRule ^/*blog(/(.*))?$ http://%{HTTP_HOST}/$2 [R=301,L]
    (all on one line in the .htaccess file in the WordPress section immediately after rewrite engine on)

Topic Closed

This topic has been closed to new replies.

About this Topic