title: Get base url in model
body: <p>I use zend framework to develop my project. I want to get base url with its protocol in some model. I try following lines to do that. But it return empty. </p>
  
  <pre><code>$front = Zend_Controller_Front::getInstance();
  $baseUrl = $front-&gt;getBaseUrl();
  echo $baseUrl; 
  </code></pre>
  
  <p>Can i get base url from that way. What are the best solution to do that. I can use also following line. </p>
  
  <pre><code>$baseUrl  = 'http://'. $_SERVER['HTTP_HOST'];
  echo $baseUrl; 
  </code></pre>
  
  <p>But i want best solution. Please help me. </p>