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: http://www.abcd.com/ar/shop-listing/health-beauty/ but still I can see the page if I entered like http://www.abcd.com/ar/shop-listing/health-beauty~@/#$ &&&%%$ %3Cscript%3E/

Can anyone suggest a best solution to approach this issue?

Thanks in advance guys!