This tool converts Apache .htaccess rules to Nginx configuration, optimized for use with php-fpm environments
Options -Indexes
: Disables directory listingOptions +FollowSymLinks
: Noted as default in NginxErrorDocument
: Custom error pagesDirectoryIndex
: Default index filesExpiresByType
: Caching for static filesAddType
: MIME type mappingsAddCharset
: Character set configurationAddHandler
: Handler mappings (e.g., CGI, PHP)SetEnv
: Environment variables for FastCGISetEnvIf
: Conditional environment variablesHeader
: Custom HTTP headersAuthType Basic
: Enables basic authenticationAuthName
: Sets authentication realmAuthUserFile
: Specifies authentication fileRequire valid-user
: Requires valid user for accessFiles
: Exact-match file-specific rulesFilesMatch
: Regex-based file-specific rulesLocation
: Exact-match URL-specific rulesLocationMatch
: Regex-based URL-specific rulesRewriteEngine
: Enables rewrite moduleRewriteBase
: Base path for rewritesRewriteCond
: Conditional rewriting (supports -f, -d, -s, -l, -U, regex, comparisons, [OR], [NC])RewriteRule
: URL rewriting (supports flags: L, R, NC, QSA, NE, E, P, F, G, T)RewriteMap
: Mapping variables using text filesRedirect
, RedirectMatch
: URL redirectsDeny
/Allow
: Access control (inside and outside Files/FilesMatch/Location)Limit
/LimitExcept
: Restrict HTTP methodsCustomLog
/AccessLog
: Logging configurationAlias
/AliasMatch
: Path aliasingmod_deflate
/mod_gzip
: Compression settingsRewriteCond
with -U
(URL existence check, outputs proxy_pass or try_files)RewriteCond
with -l
(symbolic link check, suggests try_files or Lua)RewriteCond
with chained or nested logicRewriteRule
with T
flag for complex MIME type logicRewriteMap
with non-text sources (e.g., dbm, prg)AddHandler
for non-standard handlersphp_flag
/php_value
: PHP settings (use php.ini or FPM config)IfModule
: Module checksOrder
: Access control orderAllowOverride
: Directory override settingsAuthGroupFile
, AuthDigest
)