I have been struggling with managing domains for two separate EE installations. Htaccess redirects only seem to work with the site's homepage. Anything beyond that results in a 404 error.
For example: http://domain.com is set as the root, and uses index.php to set the systempath variable thusly: $system_path = ‘./site1/‘;
My 301 redirect was pointing http://domain2.com to http://domain2.com/site2, which is what is causing the template mapping to fail. So, http://domain2.com/template_group/ results in a 404 error.
What I want to do is point both domains toward the root, and have the index.php file detect the URL and do this:
if url is domain1.com { $system_path = ‘./site1/‘; } if elseif url is domain2.com { $system_path = ‘./site2/‘; }
I’m not sure what the proper syntax to use is, though. I know that CodeIgnitor has some specific functions for handling URLs.
Conversely, if someone can help me figure out why the htaccess isn't functioning. Either way, I just need to resolve the issue.
Thanks,
ty