Welcome Guest, Not a member yet? Register   Sign In
Rewrite for inline anchor
#1

[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 # ?
#2

[eluser]sharpe[/eluser]
You use &lt;base href=""&gt; tag?
#3

[eluser]hykoh[/eluser]
yes - &lt;base href="http://subdomain.example.com/" /&gt;
#4

[eluser]sharpe[/eluser]
there is your problem Smile
#5

[eluser]hykoh[/eluser]
why ? Big Grin how can i fix it ? i dont want to remove the base tag :/
#6

[eluser]ray73864[/eluser]
use either site_url() or base_url() as shown in the user_guide for the 'url helper'.

something like: <a href="&lt;?= base_url() ?&gt;#xxx">Go to category XXX</a>

or use the anchor() function: &lt;?= anchor('controller/function#xxx', 'Go to category XXX'); ?&gt;




Theme © iAndrew 2016 - Forum software by © MyBB