ASP.Net C# newbie here. I am looking for suggestions upon constructing a condition to validate if a website URL do not contain any ISO language code or regional sub-directory e.g. /us-en, /ae-en, /gb-en, etc. using regular expression.
Sample website URLs:
• a website URL with language code - https://www.xbox.com/en-US/xbox-one?xr=shellnav
• a website URL without language code - https://www.xbox.com/xbox-one?xr=shellnav
Sample Scenario:
• website URL without any ISO language code must not be accessible and displays Page Not Found or 404 Error Message.
Much better if the suggestion is in negative approach — if the website URL do not contain any ISO language code it will execute the block of code in the statement (Page Not Found or 404 Error Message).