Rewriting URL from postNuke to WordPress

I have a postNuke site that I’m currently transferring to WordPress and I would like the format of the old site not to be lost in the conversion. I’ve tried to play with it but I’m going nowhere fast!

The current site currently rewrites the URL to :

Read More
domain.com/Article1234.html

where 1234 is the internal id number of the article.

The ID in the old site is the same in the new site. The URL in the new wordpress site currently rewrites to a custom structure :

/%category%/%postname%

Here is what is in the .htaccess file:

# 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]
</IfModule>
# END WordPress

What is needed to be done to redirect the old format to the new one? Change rewrite rule in htaccess? 301 redirect? wordpress plugin for rewriting?

Related posts

Leave a Reply

1 comment

  1. If you don’t have a lot of articles, you can use RedirectPermanent, but you have to write yourself the directives in your .htaccess file.

    Or you can use .htaccess like this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteRule ^Article([0-9]+).html$ /index.php?p=$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    

    This will rewrite Article1234.html to index.php?p=1234, then wordpress will make a 301 redirection.

    Be careful when modifying permalinks since .htaccess could be override, to avoid this you can place custom rewrite rules before # BEGIN WordPress.