WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Probably not the correct fora to ask, but.. Also probably a simple question..

We are changing our site to Wordpress, and need to redirect old posts.

Previously structure: http://url.com/art/12345.html

Needs to go to http://url.com/?p=12345

share|improve this question
up vote 3 down vote accepted

Use this before any mod_rewrite directives:

RedirectMatch Permanent ^/art/(\d+).html /?p=$1
share|improve this answer
Thank you! Works like a charm! ;) – Martin-Al Mar 3 '11 at 11:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.