I need a URL structure for my detail page at work. Everything works fine, but if the URL contains any dots, it returns a 404 page. For example:
mysite.com/product/xxxxx-yyyyyy-zzzzz-3.5kg-id
Due to the dot in the URL (specifically, ‘3.5kg’), it results in a 404 error. I’ve tried using the [[…slug]] option and structures, rewrites in Next config but they didn’t work.
It was because of i18n configurations. I changed middleware matcher and excluded all dots. It works fine now.