2

I have a Django website with

USE_I18N = True
USE_L10N = True

and added middleware:

'django.middleware.locale.LocaleMiddleware'

Currently the website will add a language prefix (i.e. /en/) to my path in case the prefix is missing.

example.com/page/
(301)=>
example.com/en/page/

I want to disable that behavior. If the language prefix is missing in the users URL I want a clean 404.

How can I do that?

caliph
  • 1,389
  • 3
  • 27
  • 52

0 Answers0