yourselfhosted / slash

An open source, self-hosted links shortener and sharing platform. Save and share your links very easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parameterized redirection

heynemann opened this issue · comments

Is your feature request related to a problem?

Many times we want users to provide parameterized links, such as /s/google/something redirecting to https://www.google.com/search?q=test. This allows the redirection service to be that more powerful, since it becomes more flexible.

Describe the solution you'd like

Ideally slash would allow users to provide two URLs, one for no parameters, other with parameters. One of them must be filled. These could work like:

Memorable Name: google/(.+)
URL: https://www.google.com/search?q=\1

Memorable Name: my-api/(^/+)/(\d+)
URL: https://myapi.mycompany.com/\1?pageSize=\2

Additional context

No response