Rewrite for inline anchor - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Rewrite for inline anchor (/showthread.php?tid=12173) |
Rewrite for inline anchor - El Forum - 10-09-2008 [eluser]hykoh[/eluser] I'm using language/index.php rewriting .. my URI's are actually looking like this: Code: http://www.example.com/en/controller/function Now i tried to set an internal anchor Code: <a href="#xxx">Go to Category XXX</a> Code: <a name="xxx">Category XXX</a> but if i click on the first anchor, it forward me like a "real" link. How can i reply all href urls beginning with # ? Rewrite for inline anchor - El Forum - 10-09-2008 [eluser]sharpe[/eluser] You use <base href=""> tag? Rewrite for inline anchor - El Forum - 10-09-2008 [eluser]hykoh[/eluser] yes - <base href="http://subdomain.example.com/" /> Rewrite for inline anchor - El Forum - 10-09-2008 [eluser]sharpe[/eluser] there is your problem Rewrite for inline anchor - El Forum - 10-09-2008 [eluser]hykoh[/eluser] why ? how can i fix it ? i dont want to remove the base tag :/ Rewrite for inline anchor - El Forum - 10-09-2008 [eluser]ray73864[/eluser] use either site_url() or base_url() as shown in the user_guide for the 'url helper'. something like: <a href="<?= base_url() ?>#xxx">Go to category XXX</a> or use the anchor() function: <?= anchor('controller/function#xxx', 'Go to category XXX'); ?> |