Base URL and language URL

I’m trying multisite setup.

# config/config.php
c::set('languages', array(
  array(
    'code'    => 'es',
    'name'    => 'Español',
    'locale'  => 'es_ES.utf8',
    'default' => true,
    'url'     => '/' # <--no prefix here
  ),
 array(
   'code'    => 'en',
   'name'    => 'English',
   'locale'  => 'en_US.utf8',
   'url'     => '/en',
 )
));

So far so good.
But then I added relative URL’s:

# config/config.php
c::set('url', '/');

Now, in default language, links return:
//page

Instead of:
/page

Which leads to a blank page.

Links are broken if default has no prefix.
Both languages work well if prefix is set.

Just a guess, but have you tried to ommit the slash for the default language in the language array like this …?

'url' => ''
1 Like

Thank you @flokosiol.

Omitting the URL value fallsback to its own language code: /es/