I'm working on a directory with Cities & States - the site has been operational for several years - but I have always wanted to make the urls clean.
I have been seeing this done (especially through wordpress)
Here is what url looks like currently:
website.com/directory/index.php?state=5
California Directory
website.com/directory/index.php?state=5&city=2292
Long Beach California Directory
Here is how I would like the url to look:
website.com/directory/california/
website.com/directory/california/long-beach
My main database consists of 51 states ID numbers, including District of Columbia (with state abbreviation & full state name) and 1,847 Distinct Counties with 29,640 Distinct city ID numbers with 41,580 zip codes it also has the latitude & longitude for each, in order to generate maps.
There is another database with several categories/services listed for each city ID. (Example: janitorial, gardening/landscape, pest control, real estate, etc.) Then there are various business listed under each category.
These are displayed currently:
website.com/directory/index.php?state=5&city=2292&svc=1
website.com/business/index.php?bid=10
Here is how I would prefer the urls to appear:
website.com/directory/california/long-beach/gardening/
website.com/directory/california/long-beach/gardening/joes-lawn-service/
or
website.com/business/joes-lawn-service/
I greatly appreciate any assistance with figuring this out. I looked at many options but I haven't found any that discuss and demonstrate using a database to gather the information.