Support » Fixing WordPress » htaccess to allow mapping of old pages to new WP install.

  • Resolved rp108108


    Hi All,

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

    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–

    Example of the new WP Post URL: http://fat–loss–

    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– [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,

  • The topic ‘htaccess to allow mapping of old pages to new WP install.’ is closed to new replies.