PHP Codeigniter site_url produce HTML link error <p>in my view, i try to print URL to my controller, below the code :</p> <pre><code>&lt;p id="demo"&gt; &lt;a href="&lt;?php echo site_url('HT');?&gt;"&gt; Goto Controller &lt;/a&gt; &lt;/p&gt; </code></pre> <p>However those code provide HTML link error like this :</p> <pre><code>&lt;a href="http://::1/cidLab/index.php/HT"&gt; Goto Controller &lt;/a&gt; </code></pre> <p>The link should be go to <strong><code>http://localhost/cidLab/index.php/HT</code></strong> but why must <strong><code>http://::1/</code></strong> ?</p> <p>I've try to use base_url, but still face same Error...</p>