Remove special characters in a URL

I need a help to prevent special characters in URL & it should redirect to 404 error page, if anyone specifically entered characters. I tried couple of ways through .htaccess but none of them worked.

Expected URL: but still I can see the page if I entered like$ &&&%%$ %3Cscript%3E/

Can anyone suggest a best solution to approach this issue?

Thanks in advance guys!