I’m using this cool plugin by d4l-data4life to generate a static version for one of my websites https://getkirby.com/plugins/d4l-data4life/static-site-generator. Here is the structure of my folder, as hosted on my client’s FTP:
📄 .htaccess 📁 assets 📁 content 📄 index.php 📁 kirby 📁 media 📁 site 📁 static
And here is my
<?php return [ 'languages' => true, 'debug' => true, 'home' => 'about', 'd4l' => [ 'static_site_generator' => [ 'endpoint' => 'generate-static-site', # set to any string like 'generate-static-site' to use the built-in endpoint (necessary when using the blueprint field) 'output_folder' => './static', # you can specify an absolute or relative path 'preserve' => , # preserve individual files / folders in the root level of the output folder (anything starting with "." is always preserved) 'base_url' => '/', # if the static site is not mounted to the root folder of your domain, change accordingly here 'skip_media' => false, # set to true to skip copying media files, e.g. when they are already on a CDN; combinable with 'preserve' => ['media'] 'skip_templates' =>  # ignore pages with given templates (home is always rendered) ] ], ]
But here is my problem: if I activate the
RewriteBase /static rule in my
.htaccess file, the static website works but I can’t access to the Panel anymore. And if I don’t active it, obviously I can access to the Panel but the website is no longer serving the static version of it.
So how do I need to configure the
index.php and the
.htaccess files so the panel is still accessible by my client and the server still serving the
/static version of the website?
Let me know if my question is not clear enough.