Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Subsite module, DNS configuration

Go to End

20 Posts   10050 Views


Community Member, 137 Posts

11 May 2010 at 8:20pm

Edited: 11/05/2010 8:45pm

bennylope how would I got about setting that A Record exactly??? You mean to add a A record in the domain.

say I've got a then on my gridservice I create a another directory create the html directory inside that, is that how you would set it up?

Is that a .htaccess thing I need to set, or do I have to edit the domain or?


Community Member, 20 Posts

3 January 2013 at 6:21pm

Hi TF-35Lightning

I read this post and found this is similar to what i am looking for.I m using my wamp server to point my subsite to subsite1.mysilverstripe.I have added the virtual host in the similar way u mentioned and the .htaccess thing.with which i can point the
subsite1.mysilverstripe and mysilverstripe to the same home page...
This is quite similar to what happened with u.
Hope could help me...


Community Member, 28 Posts

30 January 2013 at 6:34am

i have similar problem:
a subdomain is created and exists subdomain directory under root.
Under this subdomain directory a .htaccess is created with:
# Subsite rewrite
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^$
RewriteRule .* framework/main.php?url=subdomain&SubsiteID=1&%1 [L]

subsiteID=1, instead subdomain/domain have actual values.
Any ideas whould be welcome (it is ss3)


Community Member, 33 Posts

27 January 2016 at 5:27pm

Edited: 27/01/2016 5:30pm

This is how I got Subsites working in Plesk 11.5 with SilverStripe 3.2.

1. Set up primary domain
2. Add subsite domains and/or subdomains in same subscription as primary
3. Set 'Document Root' to same folder as primary domain
4. For each subsite add lines similar to the following to the .htaccess for the primary domain

# subsitedomain.tld Subsite
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^subsitedomain.tld$
RewriteRule .* framework/main.php?url=%{REQUEST_URI}&SubsiteID=<thissubsiteID> [QSA]

These are the lines at the bottom of my .htaccess for a test with one primary domain and two subsites.

# Process through SilverStripe if no file with the requested name exists.
# Pass through the original path as a query parameter, and retain the existing parameters.
# Subdomain subsite
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^subtest.primary.tld$
RewriteRule .* framework/main.php?url=%{REQUEST_URI}&SubsiteID=1 [QSA]
# subsitedomain.tld Subsite
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^subsitedomain.tld$
RewriteRule .* framework/main.php?url=%{REQUEST_URI}&SubsiteID=2 [QSA]
# primary.tld Primary Domain
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* framework/main.php?url=%1 [QSA]

Thanks to other posters in this thread.

Note: Home pages for Subsites must have the URL Segment 'home'.
See -

Go to Top