I’m having this stupid problem on some shared hosting and can’t seem to get my head around it.
I always use kirby with a /public/ folder setup which never is a problem if you set the documentroot to /public/. With this specific site I change the documentroot so I used a .htaccess to rewrite to the public
so in my / I have a .htaccess to rewrite to /public/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
That all works find but the links that are generated by Kirby still contain /public/ in them So homepage etc… all works perfectly but as soon as you click on a link you have /public/ in the url. If I remove the /public/ the url still works (hence the .htaccess is doing it’s job but it’s just Kirby that keeps generating the /public/ urls from the pagelinks…
If I understand correct, you have set the DocRoot to /somepath/ while the root of the Kirby installation is at /somepath/public/. The .htaccess in /somepath/ is posted above but how does the .htaccess in /somepath/public/ looks like? And what does the config.php contain?
.htaccess in the /public/ is the standard Kirby .htaccess and index doesn’t really contain anything special except for code to fix the new roots. Config doesn’t contain anything.