My question is not very Coldbox specific I suppose, but I’m using ColdBox and trying to leverage the routes.cfm file.
I had a question around using SEO/Friendly URLS. I wanted to not show the ID in the query string and just show a friendlyURL like the URL below, but how do others pull the content from the database without using the ID (primary key value). Do most just using the friendly URL or is there someway to pass the ID when a user clicks the link, but not have it appear in the URL?
For example, if I have a product category page and in the URL you see: http://somewebsite.com/electronics-category
I know I can obviously have a field in the db and store the friendly url “string” in the database, and just look it up that way, but I don’t like filtering on string values and would rather use an ID value if that makes sense. Over the years, I’ve just had the ID in the URL if it wasn’t sensitive info, or used a UUID or GUID, but is there a way to not show the ID in the URL, but still look it up in the database using the ID?
I hope that makes sense…any help appreciated…