I do something similar on sites that use "seo-friendly" URLs.
In .htaccess:
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* /index.php [L]
Then on index.php:
if ($_SERVER['REQUEST_URI']=="/home") { include ("home.php"); }
The .htaccess rule tells it to load index.php if the requested file or directory is not found. Then you simply parse the request URI to decide what to do index.php.
source share