Reputation: 91
I am hosting several Drupal sites on an internal server, and I'm attempting to set up a Drupal multisite environment using path-based subdirectories instead of subdomains.
Current setup
subdomain.example.com
./sites
on the server, e.g. the "Travel" website directory is served from /sites/travel
, the "Blog" website directory is served from /sites/blog
./travel
to /sites/travel/web
(since the docroot for Drupal 8+ is web
).subdomain.example.com/travel
and subdomain.example.com/blog
.My goal
Now, I'm setting up a new multisite under the path /hub
and would like to configure subsites in directories under it:
subdomain.example.com/hub
.subdomain.example.com/hub/site1
.subdomain.example.com/hub/site2
.The sites.php
file is set up to accommodate:
subdomain.example.com.hub
subdomain.example.com.hub.site1
subdomain.example.com.hub.site2
Issue
With a RewriteBase /hub
along with 2 symlinks for each subsite, I can access the /hub
site correctly, and I can load the homepage for the subsites (/hub/site1
and /hub/site2
), but any paths beyond the homepage on the subsites return a 404 error (from /hub
).
Question
What is the correct way to configure Apache, symlinks, and/or .htaccess to support this setup and allow the subsites' paths to resolve correctly?
Here’s what I’ve tried so far
/hub
, /hub/site1
, and /hub/site2
./web
directory for /web/site1
-> /web
How can I make sure that subsite paths like /hub/site1/somepage
are properly handled and do not return 404 errors from /hub
?
Any help or guidance would be greatly appreciated!
Upvotes: 0
Views: 87