Hello
I checked this recipe after leraning that we can do multisite with one Kirby.
But Now, I nee to do a website and a subdomain website that will be connected in term of content, news from the first will create notification on the second and invert.
So my question is: Can I have one panel/content/media for two websites ? Considering that the second is a subdomain, and considering we need a licence for the two website.
Yes, you can use a single content/media folder and the Panel to serve two websites. To run two websites, you would nevertheless need two licenses, though.
The good news is that you can grab them at a 20% discount until Monday…
Yes I can imagine I allready have licences on hand
Just to be sure, what If I follow the recipe I have to do something like that in the index.php
:
<?php
$sites = [
'my-site.com' => 'my-site.com',
'subdomain.my-site.com' => 'subdomain.my-site.com',
];
$root = $sites[ 0 ];
$url = 'http://' . $host;
$kirby = new Kirby([
'roots' => [
'index' => __DIR__,
'site' => $root . '/site',
'content' => $root . '/content',
'media' => $root . '/media',
'assets' => $root . '/assets'
],
'urls' => [
'media' => $url . '/' . $root . '/media',
'assets' => $url . '/' . $root . '/assets',
],
]);
echo $kirby->render();
Not sure to be right…