I have setup several categories and set the permalinks to /%category%/%postname%.html
with a category base of .
to remove "category" from the url.
All categories are working except for one with the slug music. It returns a 404 (I turned of guessing a target for automatic forwarding). The strange thing is that if I rename the slug (to anything, "tmusic" works for example, so does "musict"), the link works. If I rename it back to "music" it gives 404 again. Unfortunately renaming is not an option.
Default permalinkstructure also works, but is also not an option.
I also tried renaming name and slug of that category and creating a new category with the slug "music" this one now also gives a 404. So the problem seems to be specific to /music.
get_category_by_slug("music")
gives
object(stdClass)#224 (16) { ["term_id"]=> &int(4) ["name"]=> &string(5) "Music"
["slug"]=> &string(5) "music" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(4)
["taxonomy"]=> string(8) "category" ["description"]=> &string(0) ""
["parent"]=> &int(0) ["count"]=> &int(552) ["filter"]=> string(3) "raw" ["cat_ID"]=> &int(4)
["category_count"]=> &int(552) ["category_description"]=> &string(0) "" ["cat_name"]=> &string(5) "Music"
["category_nicename"]=> &string(5) "music" ["category_parent"]=> &int(0) }
All of this should rule out any id or database mess.
The contents of my .htaccess are:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
There is another .htaccess in a parent folder of wordpress, but I renamed it to make sure that one doesn't cause problems. Still 404.
Any ideas on where/what I could look at? Anything I could do to find the source of that error or narrow down possible sources? Whats the best chance to track down what the url is actually resolved to?
Are the permalinks cached somewhere? I imported some posts with a database script and changed id's of categories.
The only installed plugin is Contact Form 7.
.
) ? Do you have any other terms or CPTs that havemusic
in them?Using Permalinks, Category base and Tag base
: You can change them, but you can't remove them from the URLs altogether.