I’m in a bind where a client has thousands of printed QR codes derived from a record ID like website.com/item/someOldRecordId and the URLs are deprecated because of a DB change that resulted in new record IDs for all the rows. i.e. the existing deprecated QR codes images need to take people to website.com/item/someNewRecordId when scanned.
The only way I can think to accomplish this redirect is to query the DB in the router for every entry URL that contains /item/, then grab the id and see if it’s new or old, then fetch the new record ID, build the new URL and then redirect.
This feels awfully slow and janky. Is there an elegant solution?
TL;DR
My feeling is that building this kind of logic into a Router is an ugly hack and probably more expensive than just paying people to re-print and replace a few thousand QR codes(?)
submitted by /u/kirkbross
[link] [comments]