I need some help with an .htaccess
rewrite.
I have a site that had this permalink:
/archive/%post_id
and changed it to this:
/%postname%/
I have tried every single permalink redirect and change plugin – none of them work for this scenario.
The site has 15,000 posts, adding one line 301 redirects in the .htaccess
file isn’t going to work.
Can someone help me add a rewrite that will redirect all instances of /archive/%post_id
to /%postname%/
?
any help appreciated!
I know you said you tried all the plugins, but just in case, did you try this one:
http://www.shoutmeloud.com/how-to-use-deans-permalink-migration-plugin-for-wordpress.html
Looks like it dynamically creates 301s for you without SEO damage. Written in 2006, still working in 2009 – you might be able to tweak the code to get it working how you want.
If that is the ‘quick’ solution then the ‘long’ solution would be to write an app to lookup the
postname
bypostid
in your mysql db and then change each post URL in your wordpress database with thepostname
value.