Serve *only* from cache for particular user-agents

rge3 nginx-forum at nginx.us
Fri Feb 21 18:13:08 UTC 2014


ajay Wrote:
-------------------------------------------------------
> you can use  http://nginx.org/en/docs/http/ngx_http_map_module.html
> 
> Ex:
> 
> map $http_user_agent $mobile {
>      ~* msn-bot  'http://devnull';
> 
>     default 'http://productionrupal';
> 
> }

Actually that worked perfectly!  Then I can do it entirely without the
'if'.

Thanks Ajay and Maxim.  I appreciate all the help!
-R

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,247837,247849#msg-247849



More information about the nginx mailing list