I'm working on a project with Zend Framework
Users will be able to post announcement on the website.
For now you can consult them with an URL formatted like (for the announcement with id = 60)
mysite.com/announcement/view/id/60
The result I want, for a better SEO, would be under the form of
mysite.com/announcement/[CITY NAME]/[ZIPCODE]/[TYPE OF GOOD]/[STREET NAME]-[ID]
all of [VARIABLE] are stored in a database and easily accessible.
However, I came up with solutions poorly efficient so I'd like to know the different ways to make the URL rewriting, and the most efficient ones.
For now, I thought about generating the URL the "hard" way when the users post their announcement in a database, and create new routes in my Bootstrap.php when the user connect. This seems ok but I think that it could take a really long time when the volume of announcement will be big.
The second solution I thought of was to generate directly the URL in a file, like an .xml file, that I could load when the user connects too, but that will pose the same problem.
Is there a way to create theses routes efficiently ?
The solution of the RewriteEngine of Apache doesn't seem to be quite flexible for that kind of wanted behaviour ...
For information, the volume of announcement will most likely be over 10 000, so the problem of efficiency is quite big.