How to match an optionally part of URL

I got a website to show different languages to user.

those urls will be shown to user with their preferred/selected language.

But meanwhile I’d like to have the following urls:

These urls will be with french regardless the users current language selection.


But actually they are same.

Just too many repeated rules in the config.

Any simple, native solution to this problem?