Skip to content

reroute enhancements #11595

@benmccann

Description

@benmccann

Describe the problem

Content will be available at two URLs when using reroute. E.g. https://kit.svelte.dev/docs and https://kit.svelte.dev/en/docs. This is detrimental for user experience and SEO, so you would have to redirect https://kit.svelte.dev/en/docs to https://kit.svelte.dev/docs. It could potentially be kind of clunky if you need to update two places everytime you want to use reroute. However, one benefit of using the current handle API is that you can choose what type of redirect you want or if you want to show a 404 page instead, so this may be the desired way to approach this issue.

People have also mentioned wanting to reroute using cookies, which the current API doesn't allow. E.g. you might put someone into an A/B test bucket and want to show them the same version of the page everytime. If it's just content it's easier to A/B test in the template with an if statement, but if you need to load different data then something like rerouting might be beneficial

Describe the proposed solution

Perhaps think about whether/if we'd like to update the API at all as part of 3.0. We could also think about whether we want these files to live in a src/kit directory or change the .client/.server portion of the filename, etc.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions