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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Subsite subdomain lost in 404-land


Go to End


1764 Views

Avatar
AlaVive

Community Member, 42 Posts

20 March 2009 at 11:12am

Hello,

I have tried to research this issue in the existing forum entries with no luck, but please inform me if it's already been addressed somewhere. And, I may be giving more info than necessary. But, I need to make this work and don't want to leave any stone unturned.

I have installed SS-v2.3.0 in the public_html directory on a shared hosting (Bluehost) account and have the main site working. As well, I have installed the subsites module according to the various directions given in the KB and in these forums. The subdomains tab appears in the top level options, and it allows me to create and then to edit the subdomains.

The problem I get is that it gives me the following error when I attempt to preview those subdomains:

404 Not Found
The requested URL /SilverStripe-v2.3.0/family/?stage=Stage does not exist.

What I've done

The mysite/config.php file has been changed to allow subsite domains as follows:

Subsite::set_allowed_domains(array(
   'com',
   'org',
   'net'
   
));

I have created a subdomain for the subsite at Bluehost as follows:

subdomain: pretendsubdomainname
root: .pretendrootdomain.com
document root: Home/public_html/SilverStripe-v2.3.0

The domain for the subsite is then registered as an add-on domain in Bluehost to point to this subsite.

The following is the .htaccess file (in case it's helpful):

# Use PHP5CGI as default
AddHandler fcgid-script .php


### SILVERSTRIPE START ###

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /SilverStripe-v2.3.0/

RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ 

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]

</IfModule>

### SILVERSTRIPE END ###

What am I missing? I'm hoping the solution is something simple that I just can't see because I've been looking at this for so long. Any help is much appreciated!