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:
http://www.example.com/blog/2012/04/post-slug
I use this code for the footnotes (produced by markdown-extra):
<p>That's some text with a footnote.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
<p>And that's the footnote. <a href="#fnref:1" rev="footnote">↩</a></p>
</li>
</ol>
</div>
This code is saved in the database as the post’s body.
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:
http://www.example.com/#fnref:1
and
http://www.example.com/#fn:1
Instead of the correct:
http://www.example.com/blog/2012/04/post-slug#fnref:1
And
http://www.example.com/blog/2012/04/post-slug#fn:1
respectively.
That is they don’t take in mind the part of the URL
/blog/2012/04/post-slug
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:
$config['uri_protocol'] = 'AUTO';
(PATH_INFO etc) but didn’t help.
Can anyone help? Thanks in advance.