Users and search engines prefer readable URLs over query strings. Achieving clean routes doesn’t require a framework; a little Apache configuration and a simple PHP router will do.
1. Rewrite rules
Add rewrite rules to your .htaccess to funnel all requests to a single PHP entry point. Exclude existing files so assets are served normally.
2. Parsing the path
In your index.php, examine $_SERVER['REQUEST_URI'] and map paths to controllers. Use a switch or array of callbacks for clarity.
3. Generating links
When building links, point to your clean routes. Avoid exposing underlying filenames in HTML; this keeps your structure flexible.