About
What HtaccessGen is, why its output is shaped the way it is, and the correctness bar every emitted directive is held to.
HtaccessGen builds Apache 2.4 .htaccess files from checkboxes and form fields — redirects, HTTPS and canonical-host rules, error pages, caching, compression, htpasswd protection, IP allow/deny, hotlink blocking, PHP flags and the WordPress front-controller block — and writes the file with the module guards, regex escaping and condition ordering already correct.
Why this exists
The .htaccess snippets that rank highest in search are a decade out of date. They mix Apache 2.2 Order/Allow/Deny syntax with 2.4 Require, they skip <IfModule> guards so a missing module turns a pasted line into a 500, and they teach Redirect 301 for “exact” redirects when that’s a prefix match that also swallows /old.bak. The tool was built to emit what a careful sysadmin would write by hand — including the comments that explain why — rather than what most copy-paste lists produce.
The correctness bar
Every block the generator emits is checked against Apache 2.4 semantics, not conventions:
RewriteCondpairs that reflect real AND/OR evaluation order- Anchored, escaped
RedirectMatchpatterns where an exact match is meant <RequireAll>+Require all granted+Require not ipfor deny lists — the only form that doesn’t 403 everyonemod_deflatelists that exclude already-compressed typesphp_value/php_flagonly insidemod_php.cguards, with the PHP-FPM caveat attached
The rules it can’t check for you — your host’s AllowOverride set, whether mod_expires is loaded — are flagged in the output comments and the 500-error guide instead of being silently ignored.
Nothing is uploaded
The file is assembled by JavaScript in your tab. There is no backend, no account, no telemetry on the fields — your domain, IPs and paths never leave the device. Load the page once and it works offline.
Who maintains it
A small independent team that runs focused utility sites. If you find a rule that real Apache disagrees with — a condition order, an escaping edge, a module guard that should be there — tell us; correctness reports are the mail we want most.