title: TinyMCE/MCImageManager path problems
body: <p>I am having all sorts of weird issues with paths in the tinyMCE.  I'm not sure if it has to do with the MCImageManaI'll try to summarize my setup:</p>
  
  <p>I've got a .NET website.  For now the application root is at <a href="http://localhost/APP/" rel="nofollow noreferrer">http://localhost/APP/</a></p>
  
  <p>tiny_mce is hosted in ~/tiny_mce, the imagemanager plugin is of course in ~/tiny_mce/plugins/imagemanager</p>
  
  <p>~/uploads is where I want the images to be uploaded/managed</p>
  
  <p>~/tiny_mce/plugins/imagemanager/web.config contains this key:  <code>&lt;add key="filesystem.rootpath" value="../../../upload" /&gt;</code></p>
  
  <p>It also contains     <code>&lt;add key="preview.urlprefix" value="{proto}://{host}/APP/" /&gt;</code>
  to account for the app root being not at the hostname root (seriously, I shouldn't have to hardcode that....but that's another issue)</p>
  
  <p>So far so good -- when I browse from the image dialog in tinyMCE, I get the image browser and it browses the correct folder</p>
  
  <p>The weirdness starts when I select an image.  Here's what gets put in the "Image URL" box on the "Insert/edit image" form:</p>
  
  <p>../APPot/upload/Image.JPG</p>
  
  <p>APPot?  What the hell?  Shouldn't it just be "upload/Image.JPG"?</p>
  
  <p>This was with </p>
  
  <pre><code>tinyMCE.init({
  //.....
  relative_urls: true,
  remove_script_host: true,
  document_base_url: 'http://localhost/APP/'
  });
  </code></pre>
  
  <p>and also</p>
  
  <pre><code>mcImageManager.init({
  relative_urls: true,
  remove_script_host: true,
  document_base_url: 'http://localhost/APP/'
  });
  </code></pre>
  
  <p>I can't tell if that second one is necessary, or even doing anything</p>
  
  <p>where is "ot" coming from?  I assume its existance is why it can't figure out how to use the document_base_url.</p>
  
  <p>If I reset the url prefix to the original setting:  <code>&lt;add key="preview.urlprefix" value="{proto}://{host}/" /&gt;</code>, i end up with:</p>
  
  <p>../upload/DSCF0546.JPG</p>
  
  <p>which actually seems a little closer.  No "ot" crammed in there, but it's a directory off.</p>
  
  <p>Anybody know what's going on?</p>