Note that there are some explanatory texts on larger screens.

plurals
  1. POSame page link not working in Codeigniter
    primarykey
    data
    text
    <p>I have written my own blog let’s say at example.com. I’ m trying to use footnotes for my posts. So I have a post at the address:</p> <pre><code>http://www.example.com/blog/2012/04/post-slug </code></pre> <p>I use this code for the footnotes (produced by markdown-extra):</p> <pre><code>&lt;p&gt;That's some text with a footnote.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" rel="footnote"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt; &lt;div class="footnotes"&gt; &lt;hr /&gt; &lt;ol&gt; &lt;li id="fn:1"&gt; &lt;p&gt;And that's the footnote.&amp;#160;&lt;a href="#fnref:1" rev="footnote"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt; &lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; </code></pre> <p>This code is saved in the database as the post’s body.</p> <p>The problem is that when I point to the browser to the post and click the links they point to the home page of my site like this:</p> <pre><code>http://www.example.com/#fnref:1 </code></pre> <p>and </p> <pre><code>http://www.example.com/#fn:1 </code></pre> <p>Instead of the correct:</p> <pre><code>http://www.example.com/blog/2012/04/post-slug#fnref:1 </code></pre> <p>And </p> <pre><code>http://www.example.com/blog/2012/04/post-slug#fn:1 </code></pre> <p>respectively.</p> <p>That is they don’t take in mind the part of the URL </p> <pre><code>/blog/2012/04/post-slug </code></pre> <p>They "think" they are in the home page for some reason. In Codeigniter I have chosen not to include index.php in the URL. And of course I have some routing definition in the routes.php file. I cant’ figure out why this problem occurs. Maybe it has to do with routing. I have tried all the available options in the config.php file:</p> <pre><code>$config['uri_protocol'] = 'AUTO'; </code></pre> <p>(PATH_INFO etc) but didn’t help.</p> <p>Can anyone help? Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload