⚙️

htaccess to Nginx Converter

Convert Apache .htaccess rules to Nginx config syntax. Handles rewrites, redirects, error pages, and more.

Loading tool...

About This Tool

Migrating from Apache to Nginx is a common task, but manually converting .htaccess directives can be tedious and error-prone. This tool automates the translation of the most common Apache directives into their Nginx equivalents. Supported conversions include RewriteRule (rewrites and redirects), RewriteCond (with special handling for HTTPS forcing and www-to-non-www redirects), Options (directory indexing), ErrorDocument, Header set, gzip compression, deny/allow rules, FilesMatch blocks, and Cache-Control headers. Directives that cannot be automatically converted are flagged with warnings so you know what to review manually. Load the built-in example to see a real-world conversion. Always review and test generated Nginx config before deploying to production.