Support » How-To and Troubleshooting » Default rewrite allows infinite slug buildup

Default rewrite allows infinite slug buildup

  • I had some issues with a WP site which used a lot of resources, so much that it killed my webserver…
    After some research I found out that it was a combination of WP + W3TC + Wordfence, but basically it comes down to the rewrite structure of WP.

    It seems that you can open a structure that keeps on going, by repeating the category (or custom taxonomy) slug, ie site.com/category/somecategory/2014/category/somecategory/2014/category/somecategory/2014/category/somecategory/2014/category/somecategory/2014/category/somecategory/2014/ etc (the number is unlimited) which will show the posts categorized under the 2014 subcategory…

    Where it should give a 404 error when using it more than once… or just fall back to site.com/category/somecategory/2014/

    Problem is that this is default WP behaviour… and not good for SEO, or , when you’re using a plugin like W3TC creates some other problems. When advanced page caching is on, it will create the entire folder structure on the server itself… I had one site where it created 100’s of folders and a lot of folders in folders. (probably a crawler)

    If you try to empty the cache, it will fail, because of the number of folders. And I have Wordfence on the same installation, which scans all the folders for stuff that shouldn’t be there… which eventually killed the webserver…

    I found a ‘simple fix’, by installing a plugin which removes the /category/ base… but it only works for the default post category base, the same issue exists when using custom taxonomies, and it shouldn’t take a plugin to fix default behaviour.

    Is there some way to fix this?
    Tried to find the issue on Google, but didn’t find anything there :/

  • The topic ‘Default rewrite allows infinite slug buildup’ is closed to new replies.