[GH-ISSUE #349] URL redirect #1407

Closed
opened 2026-04-16 08:03:20 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @miloschwartz on GitHub (Mar 16, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/349

Originally assigned to: @miloschwartz on GitHub.

Discussed in https://github.com/orgs/fosrl/discussions/245

Originally posted by strich3 February 27, 2025
Add a redirect option to the rules, for example:

If you want people to get redirected from website.xyz/somethingold to website.xyz/somethingnew

Very simple but could be useful

Originally created by @miloschwartz on GitHub (Mar 16, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/349 Originally assigned to: @miloschwartz on GitHub. ### Discussed in https://github.com/orgs/fosrl/discussions/245 <div type='discussions-op-text'> <sup>Originally posted by **strich3** February 27, 2025</sup> Add a redirect option to the rules, for example: If you want people to get redirected from website.xyz/somethingold to website.xyz/somethingnew Very simple but could be useful </div>
GiteaMirror added the new feature label 2026-04-16 08:03:20 -05:00
Author
Owner

@snagcustoms commented on GitHub (Apr 8, 2025):

Another version of this would be something in the gui to mimic this feature in nginx: location = /{return 301 $scheme://$http_host/foldername;}

<!-- gh-comment-id:2785061739 --> @snagcustoms commented on GitHub (Apr 8, 2025): Another version of this would be something in the gui to mimic this feature in nginx: `location = /{return 301 $scheme://$http_host/foldername;}`
Author
Owner

@Fred-06 commented on GitHub (May 25, 2025):

Hi,

Also interested in this feature.

Useful for example to implement oCIS and make the application work on smartphones for example because there is a Redirect URI.

Thanks a lot for the work!

<!-- gh-comment-id:2907773845 --> @Fred-06 commented on GitHub (May 25, 2025): Hi, Also interested in this feature. Useful for example to implement oCIS and make the application work on smartphones for example because there is a Redirect URI. Thanks a lot for the work!
Author
Owner

@kmanwar89 commented on GitHub (Jun 2, 2025):

+1 here please and thank you!

I'd like to redirect "api.mydomain.com" directly to "api.mydomain.com/v1/docs" when I'm accessing it via my browser, without breaking the api.mydomain.com/v1 internal health checks.

<!-- gh-comment-id:2928314956 --> @kmanwar89 commented on GitHub (Jun 2, 2025): +1 here please and thank you! I'd like to redirect "api.mydomain.com" directly to "api.mydomain.com/v1/docs" when I'm accessing it via my browser, without breaking the api.mydomain.com/v1 internal health checks.
Author
Owner

@L0sWach0s commented on GitHub (Jun 11, 2025):

I‘m also interested in this feature!

By the way:

Great job!

<!-- gh-comment-id:2962454021 --> @L0sWach0s commented on GitHub (Jun 11, 2025): I‘m also interested in this feature! By the way: Great job!
Author
Owner

@aaymecho commented on GitHub (Jun 29, 2025):

This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup.

Example: pangolin.websitename.org/old -> new.websitename.org

redirect-to:
      redirectRegex:
        regex: "^https?://pangolin\\.websitename\\.org/old.*"
        replacement: "https://new.websitename.org"
        permanent: true

also great job guys!

<!-- gh-comment-id:3016338942 --> @aaymecho commented on GitHub (Jun 29, 2025): This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup. Example: pangolin.websitename.org/old -> new.websitename.org ``` redirect-to: redirectRegex: regex: "^https?://pangolin\\.websitename\\.org/old.*" replacement: "https://new.websitename.org" permanent: true ``` also great job guys!
Author
Owner

@Nafalan commented on GitHub (Jul 13, 2025):

This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup.

Example: pangolin.websitename.org/old -> new.websitename.org

redirect-to:
      redirectRegex:
        regex: "^https?://pangolin\\.websitename\\.org/old.*"
        replacement: "https://new.websitename.org"
        permanent: true

also great job guys!

Can you explain this some more please and tell me if it's possible for me to use this solution for rybbit.io?.

Configure Your Reverse Proxy
If you’re using your own reverse proxy, configure it to:

Proxy requests to /api/* to http://localhost:3001
Proxy all other requests to http://localhost:3002

this is what they say to do.

https://www.rybbit.io/docs/self-hosting-manual

this is the documentation but also I tried to set it up but I am thinking the only solution is to use caddy as an inbuilt thing and make everything go through that.

<!-- gh-comment-id:3066979929 --> @Nafalan commented on GitHub (Jul 13, 2025): > This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup. > > Example: pangolin.websitename.org/old -> new.websitename.org > > ``` > redirect-to: > redirectRegex: > regex: "^https?://pangolin\\.websitename\\.org/old.*" > replacement: "https://new.websitename.org" > permanent: true > ``` > > also great job guys! Can you explain this some more please and tell me if it's possible for me to use this solution for rybbit.io?. Configure Your Reverse Proxy If you’re using your own reverse proxy, configure it to: Proxy requests to /api/* to http://localhost:3001 Proxy all other requests to http://localhost:3002 this is what they say to do. https://www.rybbit.io/docs/self-hosting-manual this is the documentation but also I tried to set it up but I am thinking the only solution is to use caddy as an inbuilt thing and make everything go through that.
Author
Owner

@aaymecho commented on GitHub (Jul 13, 2025):

This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup.
Example: pangolin.websitename.org/old -> new.websitename.org

redirect-to:
      redirectRegex:
        regex: "^https?://pangolin\\.websitename\\.org/old.*"
        replacement: "https://new.websitename.org"
        permanent: true

also great job guys!

Can you explain this some more please and tell me if it's possible for me to use this solution for rybbit.io?.

Configure Your Reverse Proxy If you’re using your own reverse proxy, configure it to:

Proxy requests to /api/* to http://localhost:3001 Proxy all other requests to http://localhost:3002

this is what they say to do.

https://www.rybbit.io/docs/self-hosting-manual

this is the documentation but also I tried to set it up but I am thinking the only solution is to use caddy as an inbuilt thing and make everything go through that.

For my case, what I've done is if a user registers using a link from my invitation link through pangolin, they'll automatically be redirected to my other subdomain. You can have headers so that it reads what role the user has (that's up to you) for more control, but this just traefik all in itself.

For you're case, I'm not sure what exactly you're asking for, but from the documentations you can just setup you're organization and create the two difference resources one for your backend and client.

<!-- gh-comment-id:3067124719 --> @aaymecho commented on GitHub (Jul 13, 2025): > > This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup. > > Example: pangolin.websitename.org/old -> new.websitename.org > > ``` > > redirect-to: > > redirectRegex: > > regex: "^https?://pangolin\\.websitename\\.org/old.*" > > replacement: "https://new.websitename.org" > > permanent: true > > ``` > > > > > > > > > > > > > > > > > > > > > > > > also great job guys! > > Can you explain this some more please and tell me if it's possible for me to use this solution for rybbit.io?. > > Configure Your Reverse Proxy If you’re using your own reverse proxy, configure it to: > > Proxy requests to /api/* to http://localhost:3001 Proxy all other requests to http://localhost:3002 > > this is what they say to do. > > https://www.rybbit.io/docs/self-hosting-manual > > this is the documentation but also I tried to set it up but I am thinking the only solution is to use caddy as an inbuilt thing and make everything go through that. For my case, what I've done is if a user registers using a link from my invitation link through pangolin, they'll automatically be redirected to my other subdomain. You can have headers so that it reads what role the user has (that's up to you) for more control, but this just traefik all in itself. For you're case, I'm not sure what exactly you're asking for, but from the documentations you can just setup you're organization and create the two difference resources one for your backend and client.
Author
Owner

@Nafalan commented on GitHub (Jul 13, 2025):

This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup.
Example: pangolin.websitename.org/old -> new.websitename.org

redirect-to:
      redirectRegex:
        regex: "^https?://pangolin\\.websitename\\.org/old.*"
        replacement: "https://new.websitename.org"
        permanent: true

also great job guys!

Can you explain this some more please and tell me if it's possible for me to use this solution for rybbit.io?.
Configure Your Reverse Proxy If you’re using your own reverse proxy, configure it to:
Proxy requests to /api/* to http://localhost:3001 Proxy all other requests to http://localhost:3002
this is what they say to do.
https://www.rybbit.io/docs/self-hosting-manual
this is the documentation but also I tried to set it up but I am thinking the only solution is to use caddy as an inbuilt thing and make everything go through that.

For my case, what I've done is if a user registers using a link from my invitation link through pangolin, they'll automatically be redirected to my other subdomain. You can have headers so that it reads what role the user has (that's up to you) for more control, but this just traefik all in itself.

For you're case, I'm not sure what exactly you're asking for, but from the documentations you can just setup you're organization and create the two difference resources one for your backend and client.

What I'm trying to do is poxy requests to the API which is on the same path as the main domain

So if it makes an API call for rybbit it would then route that request to ABC.com/API*

Which is running on port 3001 and the frontend user panel is on ABC.com port 3002

<!-- gh-comment-id:3067250792 --> @Nafalan commented on GitHub (Jul 13, 2025): > > > This would be good, but in the meantime you configure traefik's config dynamic config to get a similar setup. > > > Example: pangolin.websitename.org/old -> new.websitename.org > > > ``` > > > redirect-to: > > > redirectRegex: > > > regex: "^https?://pangolin\\.websitename\\.org/old.*" > > > replacement: "https://new.websitename.org" > > > permanent: true > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > also great job guys! > > > > > > Can you explain this some more please and tell me if it's possible for me to use this solution for rybbit.io?. > > Configure Your Reverse Proxy If you’re using your own reverse proxy, configure it to: > > Proxy requests to /api/* to http://localhost:3001 Proxy all other requests to http://localhost:3002 > > this is what they say to do. > > https://www.rybbit.io/docs/self-hosting-manual > > this is the documentation but also I tried to set it up but I am thinking the only solution is to use caddy as an inbuilt thing and make everything go through that. > > For my case, what I've done is if a user registers using a link from my invitation link through pangolin, they'll automatically be redirected to my other subdomain. You can have headers so that it reads what role the user has (that's up to you) for more control, but this just traefik all in itself. > > For you're case, I'm not sure what exactly you're asking for, but from the documentations you can just setup you're organization and create the two difference resources one for your backend and client. What I'm trying to do is poxy requests to the API which is on the same path as the main domain So if it makes an API call for rybbit it would then route that request to ABC.com/API* Which is running on port 3001 and the frontend user panel is on ABC.com port 3002
Author
Owner

@ryanehamil commented on GitHub (Jul 31, 2025):

This would be amazing if it were a part of the targets config. Instead of a target down a newt it would 301 redirect.

That means we wouldn't really need a "site" with a newt path for these if pangolin could be the endpoint that responds. Maybe just an alternate resource type?

This would be immensely helpful for services that change domain name. I could leave a 301 on the old url for a period of time. I am super happy with multi domain support. Makes it so easy to just select a new domain, save, and bam the new url is up and running.

<!-- gh-comment-id:3138237052 --> @ryanehamil commented on GitHub (Jul 31, 2025): ~~This would be amazing if it were a part of the targets config. Instead of a target down a newt it would 301 redirect.~~ That means we wouldn't really need a "site" with a newt path for these if pangolin could be the endpoint that responds. Maybe just an alternate resource type? This would be immensely helpful for services that change domain name. I could leave a 301 on the old url for a period of time. I am super happy with multi domain support. Makes it so easy to just select a new domain, save, and bam the new url is up and running.
Author
Owner

@miloschwartz commented on GitHub (Sep 27, 2025):

Closing this not because we're not doing it but because I want to move all feature requests back to the discussion sections for community chat and upvotes. I think there is actually an active PR for this right now.

continue in: https://github.com/orgs/fosrl/discussions/245

<!-- gh-comment-id:3342091854 --> @miloschwartz commented on GitHub (Sep 27, 2025): Closing this not because we're not doing it but because I want to move all feature requests back to the discussion sections for community chat and upvotes. I think there is actually an active PR for this right now. continue in: https://github.com/orgs/fosrl/discussions/245
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#1407