Hi. I recently started to play with Grav in order to know whether it suitable for my next project.
And I have one question. Is there a way to force default language in url?
For example, I have 2 languages: ru and en. Ru is the default. I want for any given url without a language part to redirect to */ru/**. I know that currently it is available only for home page, using a home_redirect setting.
Currently I ended up with the following setting in system.yaml:
— yaml
home:
aliases:
ru: ‘/home’
languages:
home_redirect:
include_lang: true
include_route: false
supported:
- ru
- en
This results in the correct work of routes */ru/*, */ru/{anything}*. And */* correctly redirects to */ru/*. But routes */ru/{anything}* and */{anything}* produces the the same page, which is not very good for seo. I want */{anything}* to redirect to */ru/{anything}*. Or at least to answer 404 when someone requests */{anything}*. Is it possible in Grav? Or it can be done only using web server rewrite?