idiotprogrammer
Member
Posted 5 years ago #
Hi, I have a long-running weblog which used the old kind of permalinks. I kept meaning to switch to a more readable format for permalinks /2006/10/06 etc, but I didn't see an easy way to migrate while keeping the old permalinks.
Does anyone know of a way you can keep the old permalinks and yet use the new permalink format?
I don't really need a redirect (although it would be nice). All I want is some way to keep the old links working after I change the permalink.
If worse comes to worse, I could live with two separate databases (and different directories) if that's the only solution.
Robert
Regardless what "nice" permalinks do you use - the default format (/?p=345} always works.
If by "old permalinks" you mean the default -- what some refer to as crufty, thankfully you don't have to do a thing when changing to a custom permalink structure to keep old links from breaking. That's because the default structure works no matter what you have permalinks set to.
In other words, having:
/2006/10/06/an-interesting-post
as a permalink will not keep:
/?p=100
from working.
Or in other other words, what moshu said. :)
idiotprogrammer
Member
Posted 5 years ago #
Wow, thanks! (maybe somebody should change the documentation/wiki page for permalinks).
I can't believe I've put it off for so long.
Thanks!
One more thing to add: if you use "nice" permalinks like
.../blog/123/my-genial-post-title
and you revert back to the default permalinks (/?p=123) - then whoever is linking to your post by the nice permalink, gets a big 404!
In other words: this thing works only one way!
I've just done this - changed my permalink structure to move from crufty URLs e.g.
http://news.wessexarch.co.uk/?p=124
to pretty URLs
http://news.wessexarch.org.uk/2006/11/14/saxon-coin-found-in-a-cable-trench/
..hoping that the old URL would still work. But as you'll see if you try it, it doesn't for me.
Has anyone encountered this before? Is there any .htaccess voodoo that can be done to make the old URLs work again? I don't want to go back to 'ugly' URLs if I can help it..
Cheers!