please convert this .htaccess to NGINX rewrite

António P. P. Almeida appa at perusio.net
Thu Dec 30 20:15:59 MSK 2010


On 30 Dez 2010 08h06 WET, nginx-forum at nginx.us wrote:

> could somebody convert this .htaccess to NGINX rewrite,,??
> i need it stop my forum from automatic bot poster..
>
>
> RewriteEngine on
> RewriteCond %{HTTP_USER_AGENT} ^.*(6a1pre).* [NC]
> RewriteRule ^(.*)$ - [F,L]
>

if ($http_user_agent ~* "^.*(6a1pre).*") {
  return 403;
}

--- appa




More information about the nginx mailing list