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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Question on HowTo Create an Affiliate site with SilverStripe


Go to End


2 Posts   1207 Views

Avatar
siteLease

Community Member, 4 Posts

14 August 2017 at 7:00am

I am working on several projects that I want to build affiliate sites from. Each new affiliate would have the same content and look, but the content would be customized for that affiliate from their configuration settings. I would like each affiliate to be able to have an assigned sub-domain that would access their customized promotional content, lead tracking, etc etc.

So, to be clear, this is what I want to create. The main domain would be the same site that would be customized (but not cloned) for each affiliate. Bob's sub-domain (bob.maindomain.tld) would be a window to his affiliate marketing details, presenting links associated to his affiliate account (http://bob.maindomain.tld/signup, .../invite-others, .../links, .../bobs-profile, etc). The affiliate sub-domain would then be able to have all sub-domain based interactions tracked separately and all traffic sent to that affiliate's sub-domain would stay theirs (they wouldn't loose the traffic that they worked hard to get to other affiliates).

So now that you know what I am looking to accomplish. How would I work with sub-domains, .htaccess files, and silverstripe to serve up the templates and primary content from the maindomain.tld but then fill in appropriate sub-domain based content from the affiliate's data stored in their personal login?

I welcome ideas, code samples, .htaccess file samples, and best practices for running this all with https:// SSL, tracking cookies, etc

My first and greatest focus with this question is working with sub-domains, .htaccess and serving up the same template with custom content on a per sub-domain basis. Please let me know if any of this needs further clarification.

Thank you in advance for your expertise, your time, your consideration and care for a fellow developer. I appreciate all of you wonderful people who spend hours and hours helping others to become more knowledgeable and make better software and client solutions. You are the best! ;-)

Avatar
siteLease

Community Member, 4 Posts

14 August 2017 at 9:02am

I think that this somehow also would involve configuring a wildcard subdomain setup such as *.primarydomain.tld. Can anyone give me some things to look into on this?