21285 Posts in 5732 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 905 Views |
-
Running two sites from one SS install

2 March 2009 at 5:25pm
Hi there,
I have a client with one site on Silverstripe and they want another, ideally it would run under the same install but from the viewers point of view they would not be connected.
Is this possible in Silverstripe to divert urls into separate areas and run separate templating?
Many thanks
-
Re: Running two sites from one SS install

6 March 2009 at 1:00pm
Thanks, got that running as per the wiki article...
http://doc.silverstripe.com/doku.php?id=modules:subsites#set_the_domains_for_your_subsites
Does anybody know how to setup on a local machine so you can see both sites? Currently my route /client/ gets me my main site but the subsite I have setup I can not access ...
Any help appreciated
Gwilym
-
Re: Running two sites from one SS install

6 March 2009 at 2:40pm
You'll need to access it as http://subsitename.localhost/client/
For that to work you'll need to add an entry for subsitename.localhost to your /etc/hosts file.
-
Re: Running two sites from one SS install

9 March 2009 at 12:09pm
Hmmm...sorry to be a nuisance...
- I can access http://test.ubuntuguy/site/ and it goes to the same Silverstripe frontpage as http://ubuntuguy/site
- If I setup a subsite through the admin panel at either test.localhost or test.ubuntuguy I get the below erroor page when I go to http://test.ubuntuguy/site/
====================
[Notice] Undefined index: ID
GET /sisu/Line 43 in /mnt/hgfs/Medianoche-C/Workspace/site/sapphire/core/control/ModelAsController.php
Source
34 $SQL_URLSegment = Convert::raw2sql($this->urlParams['URLSegment']);
35 $child = SiteTree::get_by_url($SQL_URLSegment);
36
37 if(!$child) {
38 if($child = $this->findOldPage($SQL_URLSegment)) {
39 $url = Controller::join_links(
40 Director::baseURL(),
41 $child->URLSegment,
42 $this->urlParams['Action'],
43 $this->urlParams['ID'],
44 $this->urlParams['OtherID']
45 );
46
47 $response = new HTTPResponse();
48 $response->redirect($url, 301);
49 return $response; -
Re: Running two sites from one SS install

9 March 2009 at 12:19pm
This is a bug that will be resolved in 2.3.1, but the cause of the issue is that your new subsite lacks a home page. Go and make a home page in your new subsite in the CMS, and it should work.
-
Re: Running two sites from one SS install

9 March 2009 at 12:42pm
Hmmm...no same error...
Could it be because I am re-writign the base url in .htaccess like this (it works fine for the main site)..
RewriteBase /test/
| 905 Views | ||
|
Page:
1
|
Go to Top |


