Help with a weird little setup

Hi everybody,

I need a little help with a setup.
I have server with two grav instances running: one at https://mydomain.tld/ that is my live system, and one at https://staging.mydomain.tld/ to preview changes before pushing stuff to the live page. Everything works as expected, but routing in the staging page is broken. This means that whenever I try to go to a subpage, I used to get an error 404, and after adding the included .htaccess file, I now get an internal server error.

The files for the live site reside at /var/www/virtual/$USER/html, the files for the staging area lie at /var/www/virtual/$USER/staging.mydomain.tld. This structure is a given, I cannot change it. Is there any way I can fix this via the htaccess file or any other way?


Did you use the stock .htaccess file that comes with Grav? It should work out of the box no matter the path.

Yes, I did. I’ve started to suspect my hoster’s webserver setup. I’ll investigate a little more. :slight_smile:

Fixed. Use the stock .htaccess and uncomment RewriteBase /. That fixes the issue. (For posteriorities sake: I’m talking about the hoster, should’ve mentioned that initially.)