How to map old CMS pages to new WP install (htaccess). (3 posts)

  1. rp108108
    Posted 4 years ago #

    Hi All,

    I am moving my content from one content management system to WordPress.
    Host provider is Bluehost.com

    I have taken pages from my old system and made each them Posts in WP.

    I have only 10 pages to move.

    In WP I am using Custom Permalink: /%post_id%/%category%/%postname%

    I would like to set the .htaccess file to take the exact page URLs from the old system and map them to the appropriate Post URL in my new WP installation.
    I want to do this as a 301 permanent move so the search engines know what has happened.

    I have done lots of htacess files, successfully, in the past but never with WP and I cannot get it to work at all with this WP installation.

    Example of an old URL: http://www.fat--loss--4-idiots.net/index.php?p=articles/fat-loss/fat-burning-foods

    Example of the new WP Post URL: http://fat--loss--4-idiots.net/22/fatloss4idiots/fat-burning-foods

    I have tried putting the existing WP htaccess code either before or after my custom code but it does not work either way.
    Currently the existing WP code is AFTER my code.

    Here is the existing WP code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Here is my custom code that I repeat/customize for EACH of the ten pages:

    Options +FollowSymlinks
    RewriteEngine on

    RewriteCond %{QUERY_STRING} ^p=articles/fat-loss/fat-burning-foods?

    RewriteRule ^index.php$ http://fat--loss--4-idiots.net/22/fatloss4idiots/fat-burning-foods? [R=301,NC]

    So after uploading the .htaccess file to the site (it has 644 permissions), I type into the browser address bar the old URL.

    What happens is I do NOT get the individual post, and the displayed URL in the browser (Firefox) address bar is simply what I typed in, not the rewritten URL.

    Any ideas folks ?

    Many thanks,

  2. bh_WP_fan
    Posted 4 years ago #

    Try the Redirection plugin.

  3. rp108108
    Posted 4 years ago #

    Thank-you very much !

    I will install now.


Topic Closed

This topic has been closed to new replies.

About this Topic