I’m working on making my website URLs more search engine friendly. Right now I have URLs that use database IDs as parameters, but I want to convert them to use actual category names instead.
My current URL structure looks like this:
http://example.com/page.php?category=12§ion=15&topic=33&item=67
What I want to achieve is something like:
http://example.com/javascript/advanced/functions/closures/
The idea is to take the ID value (like 12) from the category parameter, query my MySQL database to find the corresponding category name (like javascript), and then build a clean URL path using those names instead of numbers.
Is this possible to do with PHP and MySQL? If yes, what would be the best approach to implement this kind of URL rewriting system?