Secondary MSM site not working in ExpressionEngine

I have problems: I have an MSM site, both on intermediate and live servers. I am developing a secondary site and just switched to a live server. It is strange that it cannot connect to db. My boot config has this if statement:

if($_SERVER['HTTP_HOST'] == 'www.domain.com' || $_SERVER['HTTP_HOST'] == 'en.domain.com') 

This does not look right because ExpressionEngine cannot load site settings. So, to check, I created a simple php file on a subdomain that just echoes $_SERVER['HTTP_HOST'] and displays en.domain.com. So why is this evaluated correctly in PHP, but not in ExpressionEngine? Any thoughts?

+4
source share
2 answers

Ok, we found a problem. Apparently this server was not too pleased with the use of || (double pipe) as OR, so we put it in our own elseif statement and now it works.

+5
source

Whenever I have such a problem, I put a stamp ('Conig File'); to verify that the configuration file is being processed. You will obviously notice that the configuration file is readable or not. Once you can verify that it is being read, you can go on to find out why it is not being processed.

+3
source

Source: https://habr.com/ru/post/1442998/


All Articles