'How to prevent Permalink %tag% / %category% from outputting slashes?

I want to replace my default Category and Tag archives with new pages that use a ?=category or ?=tag query. Native Wordpress settings allow me to change the Permalink structure for Categories and Tags: mysite.com/mypage?_sft_post_tag=%tag%

The issue is %tag% and %category% always return /tag/ and /category/, please note the slashes. Do you know how to just add the tag or category without the slashes, so it will work within my intended query? Thnx!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source