Skip to content

Redirect immediately option? #18

@mrunkel

Description

@mrunkel

Right now, kirby keeps running after the call to redirectty(). This means that if there is a redirect found, the old page is completely generated before the redirect takes place.

We discovered this because we had error logging set up on our error page and it would trigger even through there was a redirect in place (that worked). This caused some head scratching until I fired up a debugger.

One way to avoid this would be if the redirectty() function stopped processing on a redirect. I haven't read through the code to see if that's possible.

The other option would be to return true if redirectty caused a redirect to take place. We could then end processing at that point.

I'm curious as to your thoughts. If you'd rather I post this over in the kirby forums instead of here in an issue, I'm happy to do that.

Enough bitching.. Thanks for the plugin, it saved me from having to write my own!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions