Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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 Aleksander Mar 3 '11 at 11:59
add comment

Your Answer

 
discard

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.