[wp-hackers] Bug #5331 and pagination permalinks
Mistah P
mistahp.hackers at gmail.com
Fri Mar 14 16:26:52 GMT 2008
(New to the list so please excuse me if I'm covering old ground.)
When researching an issue I encountered on my test setup, I came
across ticket 5331 ( http://trac.wordpress.org/ticket/5331 ). Expanded
a little and put into my own words, here's the problem.
With a permalink structure of `/%category%/%postname%/` the category
slug will return content without the category base.
Example: `site.com/my-category/my-post-slug/` works exactly as
expected. But if you crawl up, `site.com/my-category/` returns status
code 200 and displays the content from My Category, just as if the
page viewed was the correct `site.com/category-base/my-category/`.
That's not good SEO, since identical content would be returned for
both `/my-category/` and `/category-base/my-category/`. It would be
better to handle this as a 404, and even better to handle it as a 301
to the correct address with the category base.
I'm currently handling this on my own setup with .htaccess redirects
to 301 to the proper addresses, but wouldn't it be better for WP to
handle this automagically? The ticket on Trac also mentions that the
pagination links created by `next_posts_link()` will incorrectly point
to `site.com/my-category/page/2/`, which returns 404. That's not great
for SEO either, and worse still, could confound users.
On a somewhat related issue, has there been any talk about changing
the way pagination permalinks are used? The default arrangement of
using `site.com/page/2/` leaves `/page/` as a pseudo-directory that
returns 404. Would it perhaps be better to use a default setup like
`site.com/page-2/` where there's no empty directory to 404 when a
visitor or search engine crawls up the directory structure?
I'm sure the pagination issue could probably also be resolved with
redirects, but I'm no .htaccess wizard, and again, wouldn't it be
better for WP to address this?
Thanks for reading.
I'm using:
svn rev 7290 and wp 2.3.3 (both issues exist identically in both versions)
Linux 2.6.9-67.0.4.ELsmp (that's all my host tells me on that)
Apache 1.3.39
MySQL 5.0.45-community
PHP 5.2.4
More information about the wp-hackers
mailing list