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   1153 Views

Avatar
dacar

Community Member, 168 Posts

31 August 2010 at 11:17am

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

Community Member, 17 Posts

7 February 2011 at 5:36pm

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