Load other files (from outside public_html) under index.php
You can simplify your regex pattern and you might like to combine your validation with the preparation step.  The following pattern is just like yours except it allows a single trailing slash and omits it from the capture group.

if (isset($_GET['do']) &amp;&amp; preg_match('~^(\w+)/?$~', $_GET['do'], $valid)) {
    $file_name = $valid[1];
} else {
    $file_name = "home_page";
}

$fpath = FILESPATH . "{$file_name}.php";

if (!file_exists($fpath)) {
    // Error
    require_once('404.php');
    die();
}


It doesn't make sense to valid home_page with your pattern, you know it will pass every time. I suppose it could be possible that your home_page file may not exist in the directory.