Heirarchical URLs with CPT and custom taxonomy

In both your rewrite arguments, add 'with_front' => false, then for your taxonomy change 'slug' => 'topics' to 'slug' => 'knowledgebase'.

Finally, switch the order of your registration – so that register_taxonomy is called first. This will place the taxonomy rewrite rules above the post type rules (otherwise the latter will catch the former, since you have matching slugs).

Flush permalinks (just re-save them in the admin) and you’re good to go.