Been scouting the docs, cookbook and forum for solutions to setting up a multi-site solution.
Testing with plainkit 3.3.2 with the default .htaccess
file.
Works great with examples using a subdomain setup with the index.php
below (also on my local valet install) eg.:
https://multi.test
https://de.multi.test
However, I’m attempting to point to subfolders instead of the subdomain structure, for the actual project I’m working on, eg.:
https://multi.test
https://multi.test/de
index.php
in root as follows:
require 'kirby/bootstrap.php';
$sites = [
'multi.test' => 'translations/en',
'multi.test/de' => 'translations/de',
];
$host = Url::host();
$root = $sites[$host];
$url = 'https://' . $host;
$kirby = new Kirby([
'roots' => [
'index' => __DIR__,
'content' => $root . '/content',
'media' => $root . '/media',
'cache' => $root . '/cache'
],
'urls' => [
'media' => $url . '/' . $root . '/media',
'assets' => $url . '/' . $root . '/assets',
],
]);
echo $kirby->render();
Meaning the root domain has english as default, while hitting https://multi.test/de
would load the german content in my file structure:
Curious if this is possible?
Still working on my dev skills, ideas would be greatly appreciated
Best, Oliver