Why is $_SERVER['HTTP_HOST'] not evaluating to the expected value?
<p>I'm developing a Wordpress plugin, and I'm having some issues with <code>$_SERVER['HTTP_HOST']</code>.</p>

<p>This is pointing to something that's completely incorrect.  I'm calling this from my plugin directory within my Wordpress installation, and it comes up with <code>http://www.richmindonline.com/testenvironment/wp-admin/www.richmindonline.com</code>  </p>

<p>The correct path for this I'm guessing should be simply <code>http://www.richmindonline.com/testenvironment</code>. Is it possible to trim this down or somehow create a re-direct within my plugin file?</p>

<p>I'm thinking I don't need to post code for this.  Please let me know if you would like me to post a portion of the code.</p>

<p><em><strong>UPDATE</em></strong></p>

<p>Here's my .htaccess file in the root directory of that installation if that would help.</p>

<pre><code># BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /testenvironment/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /testenvironment/index.php [L]
&lt;/IfModule&gt;

# END WordPress
</code></pre>
