Forum Moderators: coopster
<?
switch($HTTP_ACCEPT_LANGUAGE):
case "hr":
include ("indexav.html");
case "bg";
include ("indexae.html");
case "en-au":
include ("indexas.html");
break;
default:
include("indexa.html");
break;
endswitch;
?>
But what about the Search engine spider will they be able to pass the index.php file?
The answer is in the switch statement.
If the agent (browser or SE bot) doesn't request any of the specified languages then it will default to indexa.html.
As it stands if the browser requests Bulgarian, Croatian, and Australian English the script will try to include indexav.html, indexae.html, and indexas.html. If this isn't what you want insert break; after each of the top two includes. Then the script will serve the index file related to the first request sent, and only that one, or default to indexa.html.
BTW, the last break; (after include("indexa.html");) isn't necessary.
Cheers.