map module not working with new 1.1.0

Maxim Dounin mdounin at mdounin.ru
Wed Aug 10 00:22:10 UTC 2011


Hello!

On Tue, Aug 09, 2011 at 07:45:47PM -0400, Rami Essaid wrote:

> Hi Guys,
> 
> Has anyone experienced any issues with the map module using the new 1.1.0
> compile of nginx?  I am mapping user agents and under 1.0.5 everything
> worked great, with the new version the exact same config doesnt seem to be
> working. I've tried two different maps based on previous comments and
> neither seem to work.  Anyone else?
> 
> 
> http {
> ....
> map $http_user_agent $searchengine {
> default 0;
>  ~(?i)mozilla 1;
> ~*mozilla 1;
> }
>  ...
>  location / {
> ....
>       if ($searchengine){
>   #return 418;
>      rewrite ^ /testing/ redirect;
>   }
> ...

Works fine here in 1.1.0.

Maxim Dounin



More information about the nginx mailing list