Setting up redirects via Craft routes? I'm trying to set up redirects for some pages (specifically pages in structure sections that are there purely for structure, which I want to redirect to their first child). Craft's  "routes" seem to be geared towards routing a request to a template. But how can I simply route a request to a different URL?

I know I can use Twig's {% redirect %} function, but to be honest I'd much rather just set up all the routes I want redirected outside my template (in order to allow me to avoid (hopefully) unnecessary conditional URL-handling logic in the template). Is this possible at all? If not, is there an elegant way of handling it inside a template?
If you want to "redirect" all parent entries of your structure that have child entries, you could do something like this in your navigation (untested code!):

&lt;ul&gt;
    {% nav page in pages %}
        &lt;li&gt;

            {% if page.getChildren()|length %}
                &lt;a href="{{ page.getChildren().first().url }}"&gt;{{ page.title }}&lt;/a&gt;
            {% else %}
                &lt;a href="{{ page.url }}"&gt;{{ page.title }}&lt;/a&gt;
            {% endif %}

            {% ifchildren %}
                &lt;ul&gt;
                    {% children %}
                &lt;/ul&gt;
            {% endifchildren %}

        &lt;/li&gt;
    {% endnav %}
&lt;/ul&gt;


If you want to exclude specific parent entries from that behavior, you could do this like so:

{% if page.getChildren()|length and page.id('and, not 1, not 2, not 3') %}