Skip to content

[Feature]: Allow hard redirect() on the same domain #9634

@machour

Description

@machour

What is the new or updated feature that you are suggesting?

Continued from the conversation with @brophdawg11 in #9590 (comment)

I'm currently migrating a PHP app to Remix, and doing it incrementally thanks to nginx:

  • mydomain.com/a is handled by PHP
  • mydomain.com/b is handled by Remix

If I do a redirect() from /b to /a, Remix tries to handle it like it's one of his routes, and it fails.
We need to be able to do a same domain "hard" redirect.

One of the solutions could be to consider absolute redirects as hard redirects, and keeping relative ones as SPA redirections.

Why should this feature be included?

This would make it easier for folks to gradually migrate an online website, and would provide a happy path doing so.

My current workaround is to redirect from /b to a subdomain which in turns redirects again to /a, which is far from ideal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions