Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#2965 closed defect (bug) (worksforme)

Permalinks with category may give a 404 error if /category/ is not in the URL

Reported by: pozhonks's profile PozHonks Owned by:
Milestone: Priority: low
Severity: minor Version: 2.0.3
Component: General Keywords: permalinks category 404
Focuses: Cc:

Description

I use the following permalinks structure: /%category%/%postname% . If someone accesses to this page http://www.domain.com/holidays/my-super-summer-time , then in his browser manually erases the postmane to come to this http://www.domain.com/holidays/ , there is a 404 error, because it should have been http://www.domain.com/category/holidays/ instead.

To solve this, I've personnally created redirect rules in my .htaccess file, but, I think, WP should edit this by itself in order to prevent this error. Here is an example of a redirect rule I use in the .htaccess file:

RedirectMatch permanent ^/holidays/$ http://www.domain.com/category/holidays/

Change History (6)

#1 @ryan
18 years ago

  • Milestone changed from 2.0.4 to 2.1

#2 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#3 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.4

#4 @jberthon
17 years ago

I have a similar problem.

What does not work is any custom permalink which does not start by /index/ or /index.php/.
So if I use /index/%category%/%postname% the permalink is working, I mean that when I click on an article, page, etc. I actually see it.
If I use /%category%/%postname% the permalink is not working. On the front page, the link seems to be correct to a post (<blog URL>/category/article) however if I click on the link I get a HTTP 404 error.

However, in my case, if I replace index or index.php by category, I have also the HTTP 404 error :-(

Note that:
/%category%/%postname% will create a link in the form <blog URL>/mycategory/mypost
whereas
/index/%category%/%postname% will create a link in the form <blog URL>/index/mycategory/mypost

Configuration:

  • brand new installation of Wordpress 2.1.2
  • Apache/2.2.3 (Ubuntu) mod_python/3.2.10 Python/2.5 PHP/5.2.1

I hope the target milestone will be reconsidered and this issue soon be solved...

#5 @DD32
17 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

This doesnt appear to be an issue on trunk at present

permalinks: /%category%/%postname%/
/uncategorized/test-post/ shows the Post
/uncategorized/ shows Uncategorized archive

I'm assuming this was probably changed with the canonical stuff or something.

jberthon's problem seems to suggest (his|her) problem was Mod_rewrite.

#6 @lloydbudd
17 years ago

  • Milestone 2.4 deleted
Note: See TracTickets for help on using tickets.