I currently have my wordpress blog (apache2, ubuntu linux) hosted at e.g. mysite.com
using ID-based linking, e.g. http://mysite.com/?p=547
. I have two goals:
- move my blog to
mysite.com/blog
- change the link structure to
/{post-title}
instead of/?p={post-id}
Moving to the new structure should be simple enough, as is changing the setting in wordpress to use the new permalink structure.
What I would also like to do is not break the random(1..100)
sites that currently link to me. I would like to use an HTTP 301 permanent redirect, but I'm not sure how to do that by changing apache's settings.
The first issue will be to handle the redirection to /blog/
for all requests.
The second issue will be to handle the new link structure. I figure I can query the mysql database easily enough and generate something like ?p={post-id} > {post-title}
, but I'm not sure what the syntax should look like and where I need to put it.
Any help would be much appreciated.