You can turn on or off the PHP errors using the htaccess file.
Add this line to the .htaccess file inside the folder you want to block and beyond.
How to redirect a non-www domain to a www domain. Edit or create your .htaccess and add the 301 redirect rules.
How to add a 301 Moved Permanently redirect without affecting your SEO.