You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature request originated from the discussion over here: #1901
My main objective is to preconfigure urls that have additional information encoded in them, but ignore that information and use a common long url. Later I might want to start using this information to direct to different long urls. For more details please see the described use case and the linked discussion.
Implementation suggestions that came to my mind:
Add additional information as query parameters
Disable query parameter forwarding
Allow matching query parameters in short urls
For example https://short.example.com/abcd?variant=a can be forwarded to a different long url than https://short.example.com/abcd?variant=b
Add additional information in the path
Url could be https://short.example.com/abcd/a
Quite similar to the Extra path forwarding feature we could match on https://short.example.com/abcd and instead of forwarding it just ignore the remaining path
This might not be as flexible as the query params because when adding multiple "parameters" to the path we could only match the first without the seconds but not the second without the first. It would make it easier to decide which short url to use if multiple match (because that case is already supported with path forwarding)
As an alternative short urls could be defined regexes which would be super flexible but also pose the risk of using evil regexes
I am looking forward to see if anyone else would like to see a similar feature.
Use case
I am using urls to my shlink instance on embedded devices.
For example the url might point to a video explaining how to use that device.
Using shlink allows me to change the actual target the url is pointing to without updating the device itself.
I now currently have the use case, that I want to point to different (long) urls based on some configuration of the device.
This configuration could include:
Different branding of the devices
Different configured language
...
The key point is that I would like to provide this context from the device (in the "short" url) but still be able to start out with a single long url for all devices (e.g. start with an english video and over time add other languages without having to edit the short url in the device)
The text was updated successfully, but these errors were encountered:
Take a look at this RFC. I think it would cover this use case (in fact I wrote it with this use case in mind, among others).
acelaya
changed the title
Match on parts of the url / encode additional non-matched information for later use
Dynamic redirects based on query parameters
Nov 8, 2023
This is now implemented. Shlink 4.0.0 will support defining dynamic redirects based on any combination of query parameters provided with the short URL.
This is implemented on top of the in-progress logic for dynamic rule-based redirects described in this RFC.
Summary
This feature request originated from the discussion over here: #1901
My main objective is to preconfigure urls that have additional information encoded in them, but ignore that information and use a common long url. Later I might want to start using this information to direct to different long urls. For more details please see the described use case and the linked discussion.
Implementation suggestions that came to my mind:
https://short.example.com/abcd?variant=a
can be forwarded to a different long url thanhttps://short.example.com/abcd?variant=b
https://short.example.com/abcd/a
https://short.example.com/abcd
and instead of forwarding it just ignore the remaining pathI am looking forward to see if anyone else would like to see a similar feature.
Use case
I am using urls to my shlink instance on embedded devices.
For example the url might point to a video explaining how to use that device.
Using shlink allows me to change the actual target the url is pointing to without updating the device itself.
I now currently have the use case, that I want to point to different (long) urls based on some configuration of the device.
This configuration could include:
The key point is that I would like to provide this context from the device (in the "short" url) but still be able to start out with a single long url for all devices (e.g. start with an english video and over time add other languages without having to edit the short url in the device)
The text was updated successfully, but these errors were encountered: