Currently urls are like this http://example.com/?p=2, so if I link to another page in my site, it will be <a href="http://example.com/?p=2"></a>
A database contains a list of pages, with 3 columns, id, title and content. So for example the page with id 2 has a title of foo.
I want the user to be able to enter the url: http://example.com/foo and have the user see what is on http://example.com/?p=2. So I will be able to link to pages like: <a href="http://example.com/foo"></a> but the URL in the address bar will remain the friendly (foo) version.
I’m not sure if this is the right syntax, but logically you should have in your .htaccess file something like this:
then inside index.php you GET title and do what you want with it.