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

Trouble with homepagefordomain module setup


Go to End


5 Posts   1383 Views

Avatar
Liquid Edge Creative

Community Member, 56 Posts

28 May 2015 at 10:19am

Hi family,

Have installed the homepagefordomain module on a site running on SS 3.1.2 but am having trouble getting it to work.

I've created a page as the landing page for the second domain and entered my domain name in the Domain(s) box on the Settings panel as myseconddomain.nz.

Currently I have the second domain pointing to the same folder as the main domain but when I enter the second domain URL into a web browser it simply switches to the main domain and displays the site homepage. It does not go to the landing page.

Initial questions:
1. What is the specific way the second domain's DNS settings should be set up to make this work? Should it be set up as a redirect to, or a mirror of, the main site, or should it just point to the same folder?
2. What format should the domain be entered in the box in the CMS? Should it include http:// at the front?

Any help much appreciated!

Thanks,

D

Avatar
swaiba

Forum Moderator, 1899 Posts

28 May 2015 at 7:40pm

Hi Dave, I've deleted your duplicate post - I assume it was a mistake.

Avatar
Pyromanik

Community Member, 419 Posts

28 May 2015 at 8:34pm

Edited: 28/05/2015 8:35pm

I'm not the author, and I don't have experience with it, but...

1: DNS is not the same as web server routing. But "pointing at the same folder" should be enough. Silverstripe does not bind to domains like some other systems do, it simply plonks whatever it was requested on into the base tag.
2: Domain is simply "yourdomain.nz"

It sounds like the module simply isn't working.
Things to check:
1. Is it an appropriate version for the version of Silverstripe you're using?
2. Do you need to do some extra installation things, say like apply an extension, or define some new director rules?
3. Did you build, and flush?

Avatar
Liquid Edge Creative

Community Member, 56 Posts

29 May 2015 at 9:05am

@swaiba: Thanks, didn't realise I'd posted twice. Thanks for taking care of it.

@Pyromanik: Thanks for your info and suggestions. There's no indication in the ReadMe that the module requires anything other than 3.1+, but updating the core might help. Likewise, there are no instructions regarding other requirements or director rules. I have indeed rebuilt the database and flushed the cache several times to no avail.

Avatar
Pyromanik

Community Member, 419 Posts

30 May 2015 at 1:25am

Hmm, last update to it was Aug 2013.
It doesn't use _config (uses the .php kind instead).

Looks like it might be in need of a touch up.

I can't see where though. https://github.com/silverstripe/silverstripe-cms/blob/master/code/controllers/RootURLController.php#L36
Perhaps try running the tests, see if that kicks up anything (you'll need PHPUnit, etc.)
Otherwise try sticking a var_dump somewhere in the block in that link above, see what happens :>