ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using Focus Lab's Master Config for most of this year and have never run into this issue before.

So here's what's happening, going to the domain (example: or brings up a 500 internal server error. Going to does too. The .htaccess file is blank for the time being, but will eventually contain rules for removing index.php, expires, etc.

Going to, or all work. Going to subpages with www in front also seems to work fine.

My config.env.php file looks a little like this:

If I change the first case to include the www, I get the 500 internal server error, AND the site shows correctly, including subpages.

If I throw the following into .htaccess (www to no www redirect) and keep the first case statement in config.env.php to include the www, the site works. If I change the case statement to just be, the site does not work.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Then, if I force www in .htaccess and keep www in config.env.php, the site doesn't work. If leave off www in config.env.php, the site works.

For now, just to get the site up and running, I've forced removal of www, left www in the config.env.php file, and added other rules to .htaccess (such as removing index.php, expires, etc.) and it's working fine.

I'm wondering if anyone has any insight as to why something like this would happen? I don't know that much about servers, but something tells me there's something funky with this client's host.

share|improve this question
When you are using and the case in env-config is do you get a error500 AND the site works? The internal server error should force a shutdown? – Kim Wickell Dec 1 '12 at 23:46
I may have confused myself there. Will need to go back and look. :) – Angie Herrera Dec 2 '12 at 0:53
up vote 7 down vote accepted

In cases like these it's likely that there is something unique about how the host sets certain environment variables within PHP.

A few questions:

  • Who is the host?
  • Do you have access to server error logs?
  • If so, what's in the error log?

If you have a 500 error you should have a log of the reason somewhere on the server. If there isn't, as your host where you can access that information. That will really help drill down to the source of the problem.

share|improve this answer
The host is some random company that I've never even heard of. We have limited access to server error logs via cPanel but nothing really stuck out (mostly just a bunch of 404s). Will definitely ask though and hope for a halfway decent response. :/ – Angie Herrera Dec 1 '12 at 21:00
Also... My fault for not setting up the client with a better host in the first place. I don't even know how they ended up with this host. We're working on regaining control of their domain so we can switch them. Thanks for the tips though, much appreciated! – Angie Herrera Dec 1 '12 at 21:01
Marked this as the answer - it was definitely a host issue. We were finally able to switch them. Thanks! – Angie Herrera Jan 10 '13 at 4:21
Great! Glad to help! – Erik Reagan Jan 10 '13 at 15:07

In your index.php & admin.php are you pointing your system path to the correct spot?

I keep my system above root:

$system_path = '../system';

On a related note, can you turn on debugging in your index/admin files?

Earlier this week I had the same issue until I enabled debugging and got:

Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

Then I promptly fixed the path and it worked.

share|improve this answer
Path is set correctly; site is actually running. – Angie Herrera Dec 1 '12 at 20:58
Hey @Paulo, I am getting the same error "Your system folder path does not appear to be set correctly." however I have tried both the variations listed in the docs with no success eg. $system_path = '../'; and $system_path = '';; Any thoughts? – Dan Mar 11 '13 at 3:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.