Why are 404 errors redirecting to my homepage and not my custom 404.php?

Why are 404 errors redirecting to my homepage and not my custom 404.php?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)