.htaccess generator
Build an Apache .htaccess file with HTTPS redirects, www rules, Gzip, caching and access blocks.
.htaccess generator
Assemble a working Apache .htaccess file by ticking the rules you need — no memorizing mod_rewrite syntax. Turn on Force HTTPS and the generator writes the RewriteCond and 301 RewriteRule that push every http request to its secure equivalent. Pick a www option to canonicalize your host: redirect every visitor to the www subdomain, or strip it for a bare domain, so search engines index a single version and your analytics stop splitting traffic.
Each toggle maps to one well-formed block, and every block is preceded by a short comment so the output stays readable when you paste it into the file at your document root. Enable Gzip and you get a mod_deflate section covering the common text types — HTML, CSS, JavaScript, JSON, XML and SVG — that shrink well over the wire. Enable browser caching and a mod_expires block sets sensible far-future lifetimes for images, fonts and static assets while keeping HTML fresh.
The security-minded options are here too. Disable directory listing to stop Apache from serving an index of any folder that lacks one. Block hidden files to deny requests for dotfiles like .env, .git and .htaccess itself, which should never be reachable over HTTP. A custom 404 field adds an ErrorDocument line pointing at your own error page. Sections are emitted in a stable order — redirects first, then compression, caching and access rules — so the file behaves predictably.
Everything is generated locally in your browser. Nothing about your site is uploaded, no file is sent to a server, and the output is yours to copy or download. Because .htaccess is read on every request, keep it lean and remove blocks you do not use.