I have a site with a few PHP files responsible for showing all of the context. All of the URLs I have look like ...page.php?id=###
. Is it possible to assign some path to each id
so that a visitor thinks that he is visiting static files?
You can use URLRewrite to rewrite e.g. /page/##/
-> page.php?id=##
:
See this guide HERE.
You can do this through the mod_rewrite
in apache.
This generator might come in handy
Yes, the easiest way is to use a path like page.php/id/how-to-make-file-like-urls-on-php-site
and parse$_SERVER['PATH_INFO']
in your script.