.htaccess generator
Build an Apache .htaccess — HTTPS force, www redirects, custom 301s, caching, and a 404 page.
How to use
- Toggle HTTPS force and pick a www handling.
- Add 301 redirect lines, caching, or a 404 path as needed.
- Generate, then copy or download the file.
What it supports
Uses mod_rewrite for HTTPS force and host canonicalization — the rules are host-agnostic (%{HTTP_HOST}), so no domain input is needed. Custom 301 redirects take one old-path new-path pair per line, up to 200 lines; malformed lines are skipped with a warning. mod_expires caching is wrapped in IfModule, Options -Indexes and ErrorDocument are supported. Cache days 1–3650; the 404 path must start with /. At least one directive must be enabled. IP blocking, auth, and other server-level rules are not generated.