Hi there,
I just started using Grav! We try to create an multi-site setup.
We have around 20 domains which we want to link to one installation, with one theme (single-page). For every domain we want one page inside Grav.
We currently have the following setup:
domain-a,com -> Alias to base-domain,com
domain-b,com -> Alias to base-domain,com
base-domain,com
This domain contains the Grav installation. For each domain there is a page.
- base-domain,com/domain-a,com
- base-domain,com/domain-b,com
.htaccess
We made the following changes to our .htaccess. This is only for domain-a,com. We plan to make this dynamic, so that the requested domain always is appended to the redirect. But first we need to get the static version to work.
RewriteCond %{HTTP_HOST} ^domain-a\.com$
RewriteRule ^$ https://base-domain\.com/domain-a\.com? [NC]
The result is the base-domain,com root website delivered at domain-a,com.
When I change [NC] to [L,R=301] (basic 301 redirect), you get redirected to base-domain.com/domain-a.com and get the right page. But of course we don't want to redirect.
Does someone have an idea how to solve this? Should it be done with the setup file in the root? I looked into it, but I can't find a solution.
Andreas F
PS: Sorry for all the comma's in the domain names. As a new user I could only place 2 url's 😕