shlinkio / shlink

The definitive self-hosted URL shortener
https://shlink.io
MIT License
3.33k stars 274 forks source link

Add OS Detection for Dynamic Rules #2274

Open spencerryan opened 3 days ago

spencerryan commented 3 days ago

Summary

It would be very beneficial for us to be able to redirect based on if a user is on Windows or OSX. It appears there are a variety of other PHP libraries that do what mobiledetectlib does but with expanded functionality.

https://github.com/foroco/php-browser-detection seemed the most direct replacement while gaining the functionality to know what OS the device is running.

Use case

We use shlink as an URL shortener for our employees, and in many cases it links to software used for BYOD (Bring your own device) users. Often that software will have different download pages for the Windows vs OSX builds, and we want to have one short URL that redirects to the right download page based on OS.

acelaya commented 2 days ago

Thanks.

I added an entry here https://github.com/shlinkio/shlink/discussions/2101#discussioncomment-11319142. Feel free to up-vote so that I can prioritize.