location / { rewrite "^/admin/([^/]+).htm$" /admin/index.php?$1.htm; rewrite "^/([^/]+).htm$" /index.php?$1.htm; }