title: Zend - changing image URL path for deployment
body: <p>The title might be confusing as I'm not sure myself on how to explain this. I'm sure its a pretty simple solution.</p>
  
  <p>I'm moving all my static images,css,js to S3 - so now they can be accessed via</p>
  
  <p>Egs:</p>
  
  <pre>
  http://files.xyz.com/images/logo.gif
  http://files.xyz.com/images/submit_button.gif
  http://files.xyz.com/style/style.css
  http://files.xyz.com/js/jquery.js
  </pre>
  
  <p>files.xyz.com is a CNAME pointing to files.xyz.com.s3.amazonaws.com</p>
  
  <p>Now in my Zend layout and views - I'm accessing these with the full URL
  egs</p>
  
  <p><code>
  &lt;img src="http://files.xyz.com/images/logo.gif"/>
  </code></p>
  
  <p>My concern is when I'm testing on localhost - I dont want the data to be fetched from S3 but from my local hard disk</p>
  
  <p>So I want to do something like this. In my application.ini - I should be able to specify </p>
  
  <pre>
  resources.frontController.imageUrl = http://localhost
  </pre>
  
  <p>And when I'm deploying - simply change that to</p>
  
  <pre>
  resources.frontController.imageUrl = http://files.xyz.com
  </pre>
  
  <pre>
  And access it in the view like
  &lt;img src="&lt;?php echo $this->imageUrl;?>/images/logo.gif"/>
  </pre>
  
  <p>What is the best approach to handling this
  Thanks</p>