It looks like you need a front controller template .
Basically, each URL is redirected to a single PHP page, which determines what to do with it. You can use Apache mod_rewrite to do this with this .htaccess:
RewriteEngine on RewriteBase / RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php
This redirects everything except the static content files to index.php. Adjust as needed.
If you just want to influence the URL / new page, try something like:
RewriteEngine on RewriteBase / RewriteRule ^new-page/ myhandler.php
Any URLs starting with the “new page” will be sent to myhandler.php.
source share