Good afternoon and welcome to the Events Calendar forum!
Thank you for your interest in our products.
We’ll be glad to answer your questions.
The only ways to achieve what you are looking for are:
- The snippet you tried (I just tested it and it works – I am suspecting you might have either in the wrong spot of your functions.php file OR that you did not remove the opening < ?php tag)
- Using a redirection plugin where you manually input each single event URL and where you want it to redirect to
You might consider setting up a staging / testing clone of your site to experiment.
Have a good weekend,
Geoff B.