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.