What is the best practice for setting a default main page in PHP websites?

When setting a default main page in PHP websites, it is best practice to use a conditional statement to check if a specific page has been requested. If no page is specified, then the default main page should be displayed. This can be achieved by using the $_GET superglobal to retrieve the requested page parameter and setting a default page if it is not provided.

<?php
// Check if a specific page is requested
if(isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    // Set default main page
    $page = 'home';
}

// Include the requested page
include($page . '.php');
?>