I have encountered errors when I wanted to access my site via index.php (as well as with some components, which redirect to index.php directly, for example MyContent).
I found out, that JoomSEF search in such a case the first published menu item in the mainmenu, and displays it.
But it only adds the ItemId variable to $_GET and $_REQUEST. The task and id fields (in my case) were not imported.
So I changed the lines
$matches = array();
if (preg_match("/option=([a-zA-Z_0-9]+)/", $QUERY_STRING, $matches)) {
$_GET['option'] = $_REQUEST['option'] = $option = $matches[1];
}
around line 50-60 in sef404.php to
$params = explode( "&", $QUERY_STRING );
foreach ($params as $param) {
$tmp = explode( "=", $param );
if (count( $tmp ) == 2) {
$_GET[$tmp[0]] = $tmp[1];
$_REQUEST[$tmp[0]] = $tmp[1];
}
}
This adds all variables stored in the link in the jos_menu table to the $_GET and $_REQUEST globals, and my site works again ;-)
Best Regards
Tom