Ok, look; I'm a geek ... you asked a question, I gave an answer. I probably should have said "here's one ..." instead of just "OK..."
Of course, you're not laughing, are ya? 😃
Are we to assume that you want the content of "index.php" to change based on the value of the "main" variable in the query string?
<?php
//index.php
include 'head.html';
if ($_GET['main']=="foo") {
include 'foo.html';
} else {
include 'index.html';
}
include 'foot.html';
?>
??
For future reference, when you ask a Geek a question, make it the best you know how to make, or it may not be the answer you are looking for ... 😉