If statements based on url
<p>I'm attempting to show a div tag based on the root url of my site i.e. if the url is dev.foo.com display div if else www.foo.com don't display etc. I've come up with this</p>

<pre><code>&lt;?php if (substr($_SERVER['REQUEST_URI'], 0, 5) !== 'dev.') {
    echo '&lt;div class="dev-site-stuff"&gt;THIS IS THE DEV SITE!!&lt;/div&gt;';
}
 ?&gt;
</code></pre>

<p>But it isn't working and I can't see a reason - any thoughts greatly appreciated!</p>
