.htaccess Generator
Generate Apache .htaccess rules: redirects (301/302), URL rewrites, auth, IP allow/deny, custom error pages, security headers, HTTPS force, www force, and 10+ extras. 100% private.
About .htaccess Generator
Generate Apache .htaccess rules: redirects (301/302), URL rewrites, auth, IP allow/deny, custom error pages, security headers, HTTPS force, www force, and 10+ extras. 100% private. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
What can I generate?
301/302 redirects (single + bulk), URL rewrites (mod_rewrite), HTTP Basic Auth (with .htpasswd), IP allow/deny, custom error pages (404, 500, etc.), security headers (HSTS, X-Frame-Options, CSP), force HTTPS, force/prevent www, hotlink protection, gzip compression, browser cache rules, directory listing control.
What extras does this tool have?
Extras: (1) 301 permanent redirect, (2) 302 temporary redirect, (3) Bulk redirect (paste URL pairs), (4) mod_rewrite with regex, (5) HTTP Basic Auth + .htpasswd generator, (6) IP allowlist + denylist, (7) Custom error pages (400-503), (8) Security headers (HSTS, X-Frame, X-Content-Type, CSP, Referrer-Policy), (9) Force HTTPS, (10) Force/prevent www, (11) Hotlink protection, (12) Gzip compression, (13) Browser cache rules, (14) Copy individual sections, (15) Download as .htaccess file.
Related tools
AES-256 Encryptor / Decryptor
Encrypt and decrypt text with AES-256-GCM via the Web Crypto API. PBKDF2 key derivation, salt + IV, and 10+ extras. 100% private — runs in your browser.
API Authentication Header Builder
Build API authentication headers: Bearer token, Basic Auth, API Key, HMAC, AWS Signature v4.
Argon2 Parameter Calculator
Calculate Argon2 parameters (memory, iterations, parallelism) per OWASP RFC 9106. 100% private. 100% private.