Go to the root of your template, check if there is 404.php or not. If you can not find this file, just create one, then edit 404.php, add the following code:
header(“HTTP/1.1 301 Moved Permanently”);
Done! Simple ? Yes!
I have tested the code for www.glassescare.com