categories: category file rewrite rule to include category / subcategory?

I would like to have my category file (category.php) accessible through a URL structure such as:

mysite.com/mycategory/mysubcategory

For example, I have "health" as a category and "smoking" as a subcategory. Monitoring:

  • mysite.com/health
  • mysite.com/smoking
  • (and even) mysite.com/category/health/smoking

Everything works well.

But mysite.com/health/smoking You get a 404.

Is there anything in Settings-> Permanent links that fix this? Do I need to put a rewrite rule of some kind on functions.php?

Thank you.