nginx rewrite module is a default module that implements if-statements, rewrite directives and allows URL manipulation in nginx with the help of PCRE regular expressions (it's what mod_rewrite is to Apache)
The ngx_http_rewrite_module
module of nginx is used to change request URI using PCRE regular-expressions, return redirects, and conditionally select configurations.
(It is similar in its concept to mod-rewrite of apache.)