Prevent Craft URLs containing # from redirecting I have a Structure setup where I'd like each child to link to an anchor within the parent page (see the attached image).



But when I use &lt;a href="{{ subEntry.url }}"&gt; and click on the link, it redirects to the parent URL without the # anchor.

e.g. http://localhost:3000/services/web-interactive-design#website-design redirects to http://localhost:3000/services/website-design

How can I prevent this from happening?
The setup you have there is creating routes within the system not overriding the URL property of your entry. If you just want to generate anchors you should uncheck "Entries in this section have their own URLs"

Then within your template for your top-level structure item run a loop and output the content with ids and then the anchors as links.

{% set entries = craft.entries.section('myStructure') %}

&lt;ul&gt;
{% for entry in entries %}
    &lt;li&gt;&lt;a href="#{{ entry.slug }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;

{% for entry in entries %}

    &lt;div id="{{ entry.slug }}"&gt;
        {{ entry.content }}
    &lt;/div&gt;

{% endfor %}