Thank you, all, for taking the time to reply.
Brandon; yes, adding ../index/ to the url was a deliberate tautology ... 😉
For the rest you are correct. Once I uncomment/populate the index.php variables $assign_to_config[‘site_name’], [‘cp_url’] and [‘site_url’] I appear to commit myself to the settings for ‘site_name’ (that is to say, to the settings of the primary (top-level) domain).
Clive; I understand your point about .htaccess inheritance and I too have had success with addon- and sub.domains both with and without MSM, in the past. In fact the very issue I’m addressing in this topic is that a previously successful EE.1.6.9 MSM-based setup now no longer working correctly under EE.2.1.3.
That said can I follow Sue in saying “thanks” for writing into the record a sound protocol for moving/relocating/testing EE installations in general.
Subsequent steps I took;
1) in the main site directory, renamed .htaccess to .htaccess.bak
2) in the main site directory, renamed the file renamed_index to index.php
3) tested main site functionality successfully (See note 1, below)
4) in the folder assigned to the sub-domain, renamed the file renamed_index to index.php
5) in the folder assigned to the sub-domain, commented-out the variables $assign_to_config[‘template_group’], [‘template’], [‘site_index’] and [‘site_404’]
6) tested sub-domain functionality un-seccessfully (See note 2, below)
Note 1 - This site has MSM installed and the primary site turned Off. Despite the site being Off I updated the urls, paths and index file settings to reflect those of site2, the only site we now use on this server.
Note 2 - As expected, when I browse to the sub-domain EE defaults to using the index template of the default group
Further steps;
7) in the folder assigned to the sub-domain, un-commented the variables $assign_to_config[‘template_group’], [‘template’] and [‘site_index’] (See note 3, below)
8) in the browser selected a link to the comments template => http://sub.domain.com/index.php/template_group/comments/url_title (See note 4, below)
Note 3 - This did return template_group/template as predicated by the index.php situated in the folder assigned to the sub-domain
Note 4 - After a pause EE returned the same template_group/template as per Step 7/Note 3
And finally;
9) in the folder assigned to the sub-domain, commented-out the variables $assign_to_config[‘template_group’], [‘template’] and [‘site_index’]
10) in the browser, refreshed the link => http://sub.domain.com/index.php/template_group/comments/url_title (See note 5)
Note 5 - At this point the ‘comments’ template renders correctly to the requested article and everything works as expected - the point being that it only works when the full url is rendered out, otherwise it returns the wrong group/template altogether.
Conclusion.
In my previous EE.1.6.9 installation I was having templates render by the simple expedient of editing path.php as follows;
$site_name = “site_name”;
$template_group = “template_group”;
$template = “template”;
$site_url = “http://sub.domain.com/”;
$site_index = “index.php”;
$site_404 = “404”;
$global_vars = array(
“my_weblog” => “site2_weblog”,
“my_template_group” => “template_group”
); // This array must be associative
However under EE.2.1.3 this process of mixing and matching the with-MSM and without-MSM addon-domain/sub.domain methodologies does not appear to work quite so elegantly (in my case, not at all).
So the primary question remains; how, once MSM is installed, does one get sub.domains to work without buying a new MSM site licence for each sub-domain?
Thanks,
Jules
///// END /////
Anecdotal Footnote (... feel free to ignore).
This is my first migration from EE1.x to EE2.x and is the last I’ll do for free. As a previous protocol I’d always left the trigger word for the weblog module as ‘weblog’, included ‘_weblog’ in weblog short_names and included the term ‘weblog’ in both template_group and template names. The upgrade script changes some and not others and totally broke this site involving to date more than 25 un-billable hours of correction (most of the Easter week-end in fact).
This installation involved a server change at the same time and although I got EE.1.6.9 working correctly(?) (sub.domains and all) yet the upgrade to EE.2.1.3 necessitated 30 search and replace actions to the configuration to get items such as the source of smiley images to operate correctly.
Whilst the licensing terms permitted this process (and yes, all of the EE.1.6.9 files remain on this server, for roll-back purposes if necessary) common sense dictates that one copy the whole installation to a test-bed and get it working there first then copy the whole thing back. PLEASE DON’T though, as this will probably violate your EE license (or at the very least be very careful to ensure your test-bed version is set to Site=Off [Super-Admin Only] if doing this - and even then i’m not sure the license permits this process.).