title: PhoneGap on iOS with absolute path URLs for assets?
body: <p>Porting a web app to phoneGap on iOS, we have asset (and ajax) URLs that are absolute paths, e.g.:</p>
  
  <pre><code>&lt;img src="/img/logo.png"&gt;
  </code></pre>
  
  <p>We have the img directory packaged under PhoneGap's www directory.  The image will not load with the absolute path, but only with a relative path, e.g.:</p>
  
  <pre><code>&lt;img src="img/logo.png"&gt;
  </code></pre>
  
  <p>Could someone please explain how the URL is being prefixed or translated in this context? I.e.:</p>
  
  <pre><code>&lt;img src="/www/img/logo.png"&gt;
  </code></pre>
  
  <p>does not work either. So what is the URL base used by PhoneGap on iOS?</p>
  
  <p>We've also tried, e.g.:</p>
  
  <pre><code>&lt;img src="file://img/logo.png"&gt;
  &lt;img src="file:///img/logo.png"&gt;
  </code></pre>
  
  <p>but no go.  </p>
  
  <p>We would like to avoid changing the URLs to relative for the port, as absolute path URLs are used throughout the CSS, Ajax code, are set by Sprockets with the Rails backend, etc. How can we just get PhoneGap/UIWebView on iOS to load the assets using the absolute path URLs as written?</p>
  
  <p>I see this question is asked a lot in various forms here on StackOverflow, but I've yet to see a correct answer.</p>