I’m trying to link to an element on the same page like this
<a href="#myelement">Link</a>
...
<div id="myelement">...</div>
But the browser keeps prepending the full domain to the link and it ends up linking to
http://example.com/#myelement
causing it to reload the page instead of moving to an element on the page. How do I get it to just link to #myelement?
The problem is the
<base href="http://hecotravel.com/">element, which dictates that all links are relative tohttp://hecotravel.com/. Therefore a link to#traveleris a link tohttp://hecotravel.com/#traveler, which is a different page thanhttp://hecotravel.com/request.Either remove the
<base>element or link torequest#traveler.