title: Joomla site : baseurl does not return correct url
body: <p>I use Joomla 2.5.7 and I get a problem with <strong>$this->baseurl</strong> in one page.</p>
  
  <p>In my index.php file, I unclude .js files and .css files with <strong>baseurl</strong> like in this example :</p>
  
  <pre><code>        &lt;script src="&lt;?php echo $this-&gt;baseurl ?&gt;/templates/&lt;?php echo $this-&gt;template ?&gt;/js/jquery-1.2.6.min.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And it works fine in this kind of page :</p>
  
  <blockquote>
    <p><a href="http://mywebsite.com/index.php/myfolder" rel="nofollow">http://mywebsite.com/index.php/myfolder</a></p>
  </blockquote>
  
  <p>The page "myfolder" is a list of articles from on category.</p>
  
  <p>And when I click on a article in this page, Joomla use this url :</p>
  
  <blockquote>
    <p><a href="http://mywebsite.com/index.php/myfolder/article1" rel="nofollow">http://mywebsite.com/index.php/myfolder/article1</a></p>
  </blockquote>
  
  <p>And here, all is incorrect (css, js, ...) because my <strong>baseurl</strong> returns this :</p>
  
  <blockquote>
    <p>/folder</p>
  </blockquote>
  
  <p>instead of : </p>
  
  <blockquote>
    <p>/</p>
  </blockquote>
  
  <p>And my includes in index.php are not good for this page !</p>
  
  <p>Did you already met this issue ?</p>
  
  <p>How to fix it ?</p>
  
  <p>I didn't find where <strong>baseurl</strong> is defined, to correct it, can you help me?</p>