Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fr] Conditionally undo redirect on status code #368

Open
danielniccoli opened this issue Sep 23, 2023 · 1 comment
Open

[fr] Conditionally undo redirect on status code #368

danielniccoli opened this issue Sep 23, 2023 · 1 comment

Comments

@danielniccoli
Copy link

It would be great if I could define what status codes persist the redirect.

For example, I have a redirect rule from URL1 to URL2. I would like to being able to configure

  1. that the redirect is only persisted when the status code of URL2 returns e.g., a 200 (user stays on redirected page), or
  2. that the redirect is undone when the status code of URL2 returns e.g., a 404 (user is taken back to URL1 without any further redirect attempt).

Ideally I could choose which option a rule follows and which status to put into the condition.

@Gitoffthelawn
Copy link
Collaborator

That's a novel idea, and I like it.

I could also see the benefit of checking the status of URL1. IOW, only redirect if URL1 returns a 404.

If you add the code for this functionality, and can keep the UI change simple (don't want to make the UI too complex), I'll merge it. I'm hoping to perform several merges towards the end of 2023.

@Gitoffthelawn Gitoffthelawn changed the title Conditionally undo redirect on status cude Conditionally undo redirect on status code Sep 24, 2023
@Gitoffthelawn Gitoffthelawn changed the title Conditionally undo redirect on status code [fr] Conditionally undo redirect on status code Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants