rinogo / yourls-keep-query-string

A simple YOURLS API plugin that adds the short URL's query string (if any) to the long URL
MIT License
5 stars 3 forks source link

redirect path, not only query string #2

Closed nosovk closed 4 years ago

nosovk commented 4 years ago

Is there a way to configure plugin to redirect not only query string, but also path connected to short url?

Like: shortlink: httpx://yourls.com/shortlink destination link: httpx://short.url/somepath httpx://yourls.com/shortlink/someparam0/someparamX?param1=xxx&param2=yyy => httpx://short.url/somepath/someparam0/someparamX?param1=xxx&param2=yyy

rinogo commented 4 years ago

Hi, nosovk! This plugin only provides functionality for "keeping" the query string. However, the source for this plugin is straightforward and brief. You could certainly add the functionality yourself! You'll want to take a look at line 14 of plugin.php.