Multi-Site installation with only subfolders and redirects from non-subfolder hostname #10683
Unanswered
jannisborgers
asked this question in
Q&A
Replies: 1 comment 3 replies
-
@jannisborgers what do you want to happen with a request to the root de.example.com? 404? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m maintaining an installation that has 4 sites:
de.example.com/a
(disabled, former primary site,default
site handle)en.example.com/a
(disabled)de.example.com/b
(primary site)en.example.com/b
I have set up the baseUrls for each of the sites in the control panel using environment variables.
However, the site is still accessible via requests to
de.example.com
anden.example.com
, showing site 3 (de.example.com/b
). This should be avoided.I understand that this is because the hostname is pointing to the
/web
folder of the project. I found this approach described by @brandonkelly a couple of years ago. How I understand it for my example: Requests to web/index.php have to be set to redirect to/b
so that there’s no way to visit URLs without a path segment.I don't know how to do step 3 (locally with Nitro) for testing the solution. Without write privileges for server configuration with the client’s hoster, I would have to communicate with them via a ticketing system, so testing takes a long time. Sooo, any solution that is ready-to-go would be really helpful. 😬
Beta Was this translation helpful? Give feedback.
All reactions