How can I configure nginx
to redirect all requests from users who use an iPhone to a different server? Just iPhones. Not the other iOS devises.
I found the following code but I can't figure out how to regex the iPhone requests.
set $mobile_rewrite do_not_perform;
if ($http_user_agent ~* "???????????") {
set $mobile_rewrite perform;
}
if ($mobile_rewrite = perform) {
rewrite ^ http://just_for_iphones.com/ redirect;
break;
}