Hello
I would like to detect the device from with nginx and route to a specific root or folder of the index.html, my configuration is the following :
server {
listen 80 default_server;
server_name ~^(www\.)?(?<domain>.+)$;
location = /index.html {
if ($http_user_agent ~* '(iPhone|iPod|iPad|Android|BlackBerry|webOS|Windows Phone)') {
root /home/folder/abc;
}
if ($http_user_agent !~ '(iPhone|iPod|iPad|Android|BlackBerry|webOS|Windows Phone)') {
root /home/folder/xyz;
}
}
index index.html;
}
it gives me a page 404 error.
I would like to detect the device from with nginx and route to a specific root or folder of the index.html, my configuration is the following :
server {
listen 80 default_server;
server_name ~^(www\.)?(?<domain>.+)$;
location = /index.html {
if ($http_user_agent ~* '(iPhone|iPod|iPad|Android|BlackBerry|webOS|Windows Phone)') {
root /home/folder/abc;
}
if ($http_user_agent !~ '(iPhone|iPod|iPad|Android|BlackBerry|webOS|Windows Phone)') {
root /home/folder/xyz;
}
}
index index.html;
}
it gives me a page 404 error.