Allthough EE 2.1 doesn’t have a path.php, some of the site-specific variables can be set in index.php. I had the same problem with setting up a subdomain that uses a different homepage (a different default template_group/template).
There does seem to be an issue with the config settings, because, as soon as you enter the [‘template_group’] and [‘template’] in index.php, it overrules everything. It even overrides the $assign_to_config[‘site_404’] = ‘group/template’ that you’ve might have set in index.php. Here’s somewhat of a work-around.
in the main directory have the basic htaccess file to remove index.php from the URI like before, but we add a section before that, that points everything for the subdomain to its own subdirectory:
RewriteEngine On
RewriteBase /
# the [L] means if it matches, it's the last rule,
# any other rules for the subdomain go into
# the htaccess in that subdirectory
RewriteCond %{HTTP_HOST} example2.com
RewriteCond %{REQUEST_URI} !^/example2dir
RewriteRule ^(.*)$ example2dir/$1 [L]
# remove index.php for main domain
# only if requested file or dir does not exist
# don't forget to make EE handle 404 (template manager)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
In the htaccess for the subdirectory catch empty requests (^$), and substitute the wanted template-group.
RewriteEngine On
# RewriteBase /example2dir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteRule ^$ index.php?/wanted_template_group/index [L]
In the copy of index.php in the subdirectory, also make sure to set the “./system” variable . Set the other assign_config variables but leave template stuff empty.
$assign_to_config['template_group'] = '';
$assign_to_config['template'] = '';
$assign_to_config['site_index'] = 'http://www.example2.com';
$assign_to_config['site_404'] = 'siteparts/404';
success,
GDmac
(ps. i will test this a bit more and will update this post)