>_ tools --convert
.htaccess → Nginx Converter
Paste your Apache .htaccess rules and get the nginx.conf equivalent - rewrite rules, redirects, headers, caching, auth, and file protections - each with an honest note on where nginx does it differently. Everything runs in your browser; nothing is uploaded.
YOUR .HTACCESS
live conversion as you typeNGINX CONFIG
Honest scope: this is a directive-by-directive translator, not a compiler. It maps what it recognises and tells you where nginx genuinely differs (if() limits, no RewriteCond, add_header inheritance). Unrecognised lines are carried over as comments - never invented. Always test with nginx -t before reloading.
WHAT CHANGED & WHY
>_ FAQ
How do I convert an Apache RewriteRule to nginx?
Apache RewriteRule becomes the nginx rewrite directive. nginx matches the full request URI (with a leading slash) while Apache matched relative to the .htaccess directory, so the pattern needs a leading /. [R=301] becomes permanent, [R=302] becomes redirect, and [L] becomes last inside a location block.
Does nginx support RewriteCond?
No. nginx has no RewriteCond - you fold the condition into the rewrite regex, use an if() block (which is intentionally limited: no nesting and few operators), or split into separate server blocks. The converter flags every RewriteCond with the recommended approach.
Is the converted config ready to deploy?
Use it as a strong first draft, then always run nginx -t before reloading. The tool is a directive-by-directive translator, not a compiler - it tells you honestly where it had to approximate and carries unrecognised lines over as comments rather than inventing mappings.




