Redirect on site without www or only with www in .htaccess

If you need redirect to your site without www in url address then you can add some instruction in .htaccess
Example (all links without www) ↓

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Example (all links with www)

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.(.*) [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

Configurate PHP Errors by htaccess

Disable all php errors by .htaccess file ↓

php_value error_reporting 0
php_flag display_errors off
php_flag html_errors off
php_flag log_errors off
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag display_startup_errors off
php_flag report_memleaks off
php_flag track_errors off
php_value docref_root 0
php_value docref_ext 0
php_value log_errors_max_len 0

Also, you can set the PHP error logging in custom log file

php_flag  log_errors on
php_value error_log  /home/path/public_html/domain/custom_error_file.log