This is one of many rules i have in my htaccess
RewriteRule ^categories/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)$ types.php?type=$1&id=$2 [L]
rewrite ^/categories/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)$ /types.php?type=$1&id=$2 last;
The rewrite rule should translate easily, except that
nginx uses a leading
/ on all URIs.
nginx.conf is the starting point, but many installations use
include directives to pull in configuration from other files.
rewrite rule can be placed at
server block scope or within a
location block that processes URIs beginning with
See this document for