redirect if shortcode exists

If you look at the source code of add_shortcode you will see this function doing little more than store the name of the shortcode in a global array. So, checking if a shortcode exists means looking it up in the array.

Hence, if you want to check for a specific shortcode in the_content you must be sure that shortcode has already been added at the point you need it. Else has_shortcode will say it doesn’t exist.

Luckily, looking at the hook order, you see template_redirect being executed after after_setup_theme, the default hook to load theme related stuff. If you use that hook to add your shortcode (in functions.php), you can be sure your shortcode exists by the time you get to template_redirect.

So, yes, you are on the right track. You’re using the right hook and the data you need is available at that point in WP’s execution order.