Usually all requests are redirected (their URL is internally rewrited) to single PHP script using Apache mod_rewrite and RewriteEngine
, then (in that script) the URL is examined and handler matching this URL (if there are more handlers) with corresponding arguments is called. Some frameworks in PHP, usually MVC ones, are entirely built on one single index.php to which all requests are "redirected" (URL-rewrited).
If you need just to solve the problem with ?page=
, try rewriting URL /images/1/
to /images.php?page=1
(as Gumbo suggests) with this in Apache configuration (the .htaccess file for example):
RewriteEngine on
RewriteRule ^images/([0-9]+)/?$ images.php?page=$1 [L]