I have custom 404 page and working fine for pages that does not exist.
But I also want to show 404 page if someone query_string found to be missing/invalid/null from url.
How can I do so?
www.example.com/mypage.php?param1=value1
if(isset($_GET['param1']) && $_GET['param1'] !='')
{
//general code
}
else {
// Here I want to redirect to 404.php
}
also my 404 page is being accessed directly, and I want to prevent it.