how to change the way of GET variables work in php

mod-rewrite, php

Solution

You need to look into mod_rewrite.

From the documentation: This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly.

So the url can look like example.com/2222 for the user, but then translated into example.com/?id=2222 on the server.

Problem

I dont like something like this: `example.com/?id=2222`. How to change it into `example.com/2222`?

Original source