1 thought on “converting an apache rewrite rule to nginx”

  1. It sounds like that says, if the request method begins with TRACE or TRACK, return http 403 forbidden. If so, use the [limit_except directive](https://nginx.org/en/docs/http/ngx_http_core_module.html#limit_except) to deny everything except the desired request methods. Works sort of the inverse of apache, it defines what is an OK method, instead of defining what’s not an OK method.

    You could also use an [if directive](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#if) to act on a $request_method, eg; `if ($request_method ~* “^(TRACE|TRACK)”) { return 403; }`

    Reply

Leave a Comment