.htacces public domain not working with vitekit setup

I’m working on a project for which the client gave me 2 weeks to work on. Now on the last day I’ve run into a problem with the public folder I’ve setup. For some reason the .htaccess file doesn’t seem to work. It keeps adding the public folder in the url. for context: I’m working with the vite setup from arnoson.
This is my folder structure:

The .htaccess file in the public folder is actually empty.
the one in the root folder is like this:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]

Some ideas to debug this?

Hm, shouldn’t the original .htaccess file be in the public folder? And your domain should be pointed to the public folder.

My mistake! Yess, the original .htacces file is there indeed.
It’s my first experience with this public folder setup. I’ve contacted my hosting provider if they know how this is done.

Are you on shared hosting? Most shared hosting providers don’t support a public folder setup. You need to be able to put files/folders outside the web root.

1 Like

I’ve found a workaround. It’s indeed a shared hosting. But now i’ve put the website on a subdomain on which the .htaccess seems to do the trick. Next I’ve used webforwarding to point the main domain to this subdomain. Not the most ideal situation, but the client seems to be happy about the subdomain name :slight_smile:

Maybe nog the most kirby-related topic, but really thankfull for clearing things up.