Base URL and language URL

I’m trying multisite setup.

# config/config.php
c::set('languages', array(
    'code'    => 'es',
    'name'    => 'Español',
    'locale'  => 'es_ES.utf8',
    'default' => true,
    'url'     => '/' # <--no prefix here
   '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:

Instead of:

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/