First thing first, from PHP manual:
Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg().
With that out, if you're only trying to see what the current script is, you don't need eregi()
This will work just fine:
if ($_SERVER['PHP_SELF'] == 'config.php')
{
...header ("Location: index.php");
...exit 0;
}
Note that the correct syntax is
header, not
Header
From your code, it seems like you're trying to redirect any access to
config.php to be redirected to
index.php, is that correct?
If so, i don't know how to tell why your index.php or admin.php page is showing blank page.
probably those files have no content?