#4544 closed defect (bug) (invalid)
WP 404s manual rewrites to index.php
Reported by: | vinskapur | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
On one of my sites, the permalink structure is set to /news/%year%/%monthnum%/%day%/%postname%/
and its category base is /news/categories
. I would like to add to and uncomplicate some of these rewrites for categories deserving of their own site sections - /music/
, /onair/
etc - so I attempted to add the following rewrite in .htaccess as a starting point (before the WP block):
RewriteRule ^(news|onair|events|music)/?$ /index.php?category_name=$1 [QSA,L]
This rewrite actually works on the server side (ie /music/
rewrites to /index.php?category_name=music
), but something in WordPress throws up the is_404()
flag and it returns a file not found error page. I haven't found that something.
Change History (5)
#2
in reply to:
↑ 1
;
follow-up:
↓ 4
@
17 years ago
Replying to foolswisdom:
My guess is that you need to make that rewrite rule external.
External how? If you mean external as in separate from WP_Rewrite, it already is a separate rule in .htaccess from the WordPress catch-all block - just WordPress appears to be overriding it regardless.
#4
in reply to:
↑ 2
;
follow-up:
↓ 5
@
17 years ago
Replying to vinskapur:
Replying to foolswisdom:
My guess is that you need to make that rewrite rule external.
External how? If you mean external as in separate from WP_Rewrite, it already is a separate rule in .htaccess from the WordPress catch-all block - just WordPress appears to be overriding it regardless.
External rewrite as in:
RewriteRule ^(news|onair|events|music)/?$ /index.php?category_name=$1 [QSA,R,L]
The Rrrr is important.
#5
in reply to:
↑ 4
@
17 years ago
Replying to foolswisdom:
The Rrrr is important.
Gosh, that just isn't pretty. I guess I'll have to try and play around with the internal rewrite engine. (I still think it's a defect that said engine is overriding explicit rewrites, mind.)
My guess is that you need to make that rewrite rule external.
Closing as invalid for now.