--start of index.php--
<?php
$indexdir="/folder/"; //the folder where all sites are stored
$indexcat=".php"; //extension of all sites
$indexid = getenv("QUERY_STRING"); //request the string after index.php?
if ($indexid==""){$indexid = "start"; exit;} //set default page, if not mentioned, as "start"
$frameid = $indexdir.$indexid.$indexcat; //create the frame URL
?>
<HTML>
<HEAD>
</HEAD>
<BODY>
<p>Here is content of site</p><!-- //site content -->
<? include"$frameid";?> <!-- //include the frame as the variable $frameid -->
<BODY>
</HTML>
--end of index.php--
What I want to be fixed is, that when someone goes to that page by entering: http://www.somedomain.com/~user/index.php, the default frame(<? include"$frameid";?>) will be "start" wich actually should redirect to http://www.somedomain.com/~user/folder/start.php
in that line /folder/ is folder, start is the default page OR the string that comes after index.php? and .php is the extension variable.
This doesn't seem to work, so need advice
Also, don't get the wrong idea of what I want, I want that script working so, that the <? include"$frameid";?> "frame" will be changed if someone goes to the page and enters(for example) .../index.php?test, then it should change the frame to .../folder/test.php.. You understand? I'm no good at explaining what I want, but hope if someone can help


