Skip to content

Instantly share code, notes, and snippets.

View jasminsuljic's full-sized avatar

Jasmin Suljic jasminsuljic

View GitHub Profile
@vladkras
vladkras / default.conf
Last active January 17, 2024 09:59
NGINX redirect to app store and google play based on user agent
location = /gotoapp {
if ($http_user_agent ~* "iphone|ipod|ipad|appletv") {
return 301 https://www.apple.com/lae/ios/app-store/;
}
if ($http_user_agent ~* "android") {
return 301 https://play.google.com/store;
}
if ($http_user_agent ~* "Windows") {
return 301 https://www.microsoft.com/store/apps?rtc=1;