.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.
Bcrypt & PBKDF2 Hash Generator
Generate and verify bcrypt + PBKDF2-SHA256 password hashes. Adjustable cost factor, batch verify, hash format detection, crack-time estimate, password strength check, hash comparison, and CSV export. 100% private.
CSP Evaluator & Builder
Evaluate Content Security Policy headers for security weaknesses, detect bypass gadgets, suggest strict CSP, generate nonces, compare two CSPs, and export to Nginx/Apache/meta-tag. 100% client-side.