I am creating my menu dynamically from a database. I started by appending an id to the urls which I used to identify the page in the database and then get all urls from the subpages and so on..
so I had a lot of ids like this www.page.com/somefolder/pagename.php?id=10
, where 10 is the id of the page and is the parent_id for a number of other pages.
Now I use mod rewrite to get nicer urls. So the above url is now www.page.com/pagename.php
, which is mapped to the original url.
My pagenames are all gonna be unique.
The question: Do I have to do this for each and every url, since each url needs an id as query string or is there a better way to combine mod rewrite with dynamically generating a menu?