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, biapar, Willr, Ingo, swaiba, simon_w

subsites setup


Reply

2 Posts   1150 Views

Avatar
dacar

31 August 2010 at 11:17am Community Member, 168 Posts

Hi, iam playing around with subsites for a while now, but i am still not able to get it working. Here is what i have done so far:

1. set up an subdomain directory: .sub-carsten (thats how it works at www.bytecamp.net - very good hosting for silverstripe. They even offer an silverstripe installer)

2. set an DNS entry in the domain configuration: carsten.bliblablu.de

3. put a .htacces into the new directory. last version:

AddType application/x-httpd-php5 .php

### SILVERSTRIPE START ###
<Files *.ss>
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
</Files>

<Files web.config>
   Order deny,allow
   Deny from all
</Files>

<IfModule mod_rewrite.c>
#   RewriteBase /
   
#   RewriteRule ^subdomaindirectory$ subdomaindirectory/ [R,L]
#   RewriteRule ^subdomaindirectory/(.*)$ subdomaindirectory/$1 [L]

# Subsite rewrite
   RewriteEngine On
   RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
   RewriteCond %{REQUEST_URI} ^(.*)$
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{HTTP_HOST} ^carsten.bliblablub.de$
   # RewriteRule ^(.*)$ ../ [NC]
   RewriteRule .* ./sapphire/main.php?url=%{REQUEST_URI}&SubsiteID=3&%{QUERY_STRING} [L]

</IfModule>

### SILVERSTRIPE END ###

4. set up subsites within the admin:
4.1 Subsite Name = Carsten
4.2 Primary domain: carsten.bliblablub.de
4.3 Active Subsite: 1
4.4 Language: german
4.5 default site: no
4.6 Enable public access: true
4.7 Theme: trip

If i run http://www.bliblablub.de/?SubsiteID=3 (ID is correct) i get: The requested page could not be found.

Questions: How can i use a subdomain with subsites and what do i have to configure to make it work?

Greetings, Carsten.

Avatar
yug

7 February 2011 at 5:36pm Community Member, 17 Posts

Please someone.....i am also having trouble with this