Environment specific siteUrl settings not working
Make sure that you change .dev, .com, etc. to reflect your actual environment URLs. They operate based on a partial string match, so as long as your URL contains one of those substrings, it'll pick up the first one it matches.

For example:

'local.mywebsite' =&gt; array(
  'environmentVariables' =&gt; array(
    'userSessionDuration' =&gt; false,
    'devMode' =&gt; true,
    'siteUrl ' =&gt; 'http://local.mywebsite',
  )
),

'mywebsite.com' =&gt; array(
  'environmentVariables' =&gt; array(
    'userSessionDuration' =&gt; false,
    'devMode' =&gt; true,
    'siteUrl ' =&gt; 'http://mywebsite.com',
  )
),




UPDATE

Whoa, I think I may have just realized what the problem is... I copied my example from your original code, and copied a glitch right along with it...

You've listed siteUrl like this:

    'siteUrl ' =&gt; 'http://mywebsite.com'


Notice anything? There is an extra space between siteUrl and the closing quote.

    'siteUrl '


... should be:

    'siteUrl'