Hey there…
i am using kirby at root with multisite setup, like described in here:
On the same server i use several domains like:
kirbydomain1.de → dom1/content/
kirbydomain2.de → dom2/content/
kirbydomain3.de → dom3/content/
Many other Domains are redirected to kirbydomain1.de… but now, i need a simple onepager on a complete new domain… since kirby-license does not allow me to have another multisite-domain inside kirby (unless i pay for another license). i want to redirect the newdomain.de to a subfolder with a simple html file which is not served via kirby.
i searched web for solution and found this: regex - htaccess redirect + hide subfolder in url - Stack Overflow
Now, in my kirby .htaccess i redirect this single domain like this:
RewriteCond %{HTTP_HOST} ^(www\.)?newdomain\.de$
RewriteRule !^subfolder/ /subfolder%{REQUEST_URI} [R=302,L]
Now, when i open newdomain.de
i will be redirected to newdomain.de/subfolder
and the index.html
inside subfolder
is loaded…
This first stage is wanted… but how to hide the subfolder
from beeing shown in the URL?
The stackoverflow-Link says, the subfolder
should be hidden… is this not happening because of kirby and/or kirby-specific rules in .htaccess
?
Any idea, how to hide the subfolder
from URL when using newdomain.de
to access newdomain.de/subfolder/index.html
?
p.s. oh… and the subfolder
should not be accessible via kirbydomain1.de (which it is actually, too)