[wp-hackers] Unique permalinks vs. unique post slugs
otto at ottodestruct.com
Tue Dec 16 16:59:07 GMT 2008
On Tue, Dec 16, 2008 at 10:49 AM, scribu <scribu at gmail.com> wrote:
> I have noticed this before and filed it as a
> I don't think it's okay to have an infinite number of possible URL
> combinations all returning the same content. It should at least redirect to
> a single URL with the appropriate category slug.
The problem is that I'm not sure that there a proper fix for that
issue, because the issue is not the one you think it is.
A Permalink string of "/%category%/%postname%" is quite simply
invalid. Why? Because the custom permalink string is supposed to be
specific to a single post, but "category" is a multiple choice option.
More than one category can be associated with a post. So which one do
you choose as the canonical category for the permalink? Sure, right
now, it generates that permalink by using whatever the first category
in the list is, but that's essentially a luck-of-the-draw thing, with
no real meaning to it.
The real issue is that we allow %category% in permalinks *at all*. If
the system was consistent, "%category%" would simply not be an option
there, period. But too many people seem to use it to eliminate it.
Using category like that is an extremely poor choice for SEO, IMO, and
it also makes your URLs confusing and inconsistent. I would recommend
against using it unless you have no other choice (client wants it and
you can't talk them out of it).
More information about the wp-hackers