Best way to redirect / to another page?

Two question on the same topic actually:

  • Can I write a router for the root of the site? Like 'pattern' => '/' or 'pattern' => ''? I couldn’t manage to make anything work.
  • Can I do the equivalent of return page($page) in a template? I could use go($page) but I’d like to keep the “root” url, not the URL of the target page.

Is that for a single or multi-lang installation? If multi-lang, do you use the language code in both the default and the non-default languages?

If it’s just a single language, you can use (:any) in your pattern and then check if that is empty …

It’s a single language site. Ha, I’ll try that, thank you for your help! :slight_smile: