how do I block specific strings in my url?

for example, I want a user to go to /test but I want to block it if they try /test:abc
Was this page helpful?