Hi, i’ve the same issue with Kirby 3.2.3.
Login in panel works, playing around in panel also. But a hard refresh throws this error. I’ve to change the url in the browser from https://my-domain.tld/panel/site to https://my-domain.tld/panel (without last slug and without trailing slash) to reload the panel.
Installed with composer, webserver is Apache 2.4.38 and PHP 7.2.21 with FPM.
Played around with composer.json, .htaccess, file and directory rights and index.php with no success…
I’ll install kirby and plugins not in root directory, also content and site.
My composer.json:
{
"name": "huaba.net/feilnbacher-kaffeeschule.de",
"description": "Webseite der Feilnbacher Kaffeeschule mit Kursen, Terminen und Anmeldung auf Basis von Kirby CMS",
"require": {
"getkirby/cms": "^3.0",
"bnomei/kirby3-security-headers": "^1.1",
"omz13/kirby3-xmlsitemap": "^1.2",
"bnomei/kirby3-robots-txt": "^1.4",
"pedroborges/kirby-meta-tags": "^2.0",
"schnti/cookie": "^0.1.1"
},
"config": {
"optimize-autoloader": true
},
"extra": {
"kirby-cms-path": "kirby",
"kirby-plugin-path": "plugins"
}
}
My index.php:
<?php
include '../kirby/bootstrap.php';
$kirby = new Kirby([
'roots' => [
'index' => __DIR__,
'content' => __DIR__ . '/../content',
'site' => __DIR__ . '/../site',
],
]);
echo $kirby->render();
… and my .htaccess:
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls.
RewriteEngine on
# set the RewriteBase to:
RewriteBase /
# block files and folders beginning with a dot, such as .git
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
RewriteRule (^|/)\.(?!well-known\/) index.php [L]
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
RewriteRule ^site/(.*) index.php [L]
# Enable authentication header
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
# block direct access to kirby and the panel sources
RewriteRule ^kirby/(.*) index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# compress text file responses
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
Any ideas? Because it’s an annoying error when developing a new site…
Greets,
Huaba