i am trying to serve two different file based on the user agent. exampl:- if i go to m.abc.com from mobile device i want to serve mobile/index.php else desktop/index.php,but url should remain same.
in apache i have done like this
RewriteCond %{HTTP_USER_AGENT} !(android|blackberry|mobile|iemobile|iphone|ipod|ipad|opera\smobile|palmos|webos|bing|UCWEB) [NC]
RewriteCond %{REQUEST_URI} !(\/report\/\.*)
RewriteRule !^desktop_site/ /desktop_site%{REQUEST_URI} [L]
how can i achieve this in Nginx?
Aucun commentaire:
Enregistrer un commentaire