Redirect & htaccess Generator
Generate Apache .htaccess redirect rules — 301, 302, 307, 308. RewriteRule vs Redirect directive, bulk mode, regex patterns, www→non-www, HTTP→HTTPS, trailing slash, query string handling, history. 100% client-side.
About Redirect & htaccess Generator
Generate Apache .htaccess redirect rules — 301, 302, 307, 308. RewriteRule vs Redirect directive, bulk mode, regex patterns, www→non-www, HTTP→HTTPS, trailing slash, query string handling, history. 100% client-side. 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's the difference between Redirect and RewriteRule?
Redirect (mod_alias) is simpler — `Redirect 301 /old /new` — but doesn't support regex or query-string logic. RewriteRule (mod_rewrite) is more powerful — `RewriteRule ^old$ /new [R=301,L]` — and supports conditions (RewriteCond) for www/non-www, HTTPS, query string handling, and more.
Which redirect type should I use?
301 (Permanent) for moved pages — passes link equity. 302 (Found) for temporary moves. 307 (Temporary, preserve method) and 308 (Permanent, preserve method) for HTTP-method-safe redirects. Use 301 for SEO most of the time.
What extra features does this tool have compared to others?
(1) Redirect type selector (301/302/307/308). (2) RewriteRule vs Redirect directive toggle. (3) Bulk mode (old → new per line). (4) Regex patterns. (5) www → non-www. (6) HTTP → HTTPS. (7) Trailing slash enforcement. (8) Query string handling. (9) Copy. (10) History (localStorage, last 20). (11) Shareable URL.
Is my data sent anywhere?
No. Redirect rule generation runs locally. History is stored in localStorage on this device only.
Related tools
Affiliate Commission Calculator
Calculate affiliate commissions across four program types — flat percent, tiered percent (progressive brackets), recurring (monthly × N months), and hybrid (initial + recurring). Apply refund-rate and tax-withholding adjustments, compute effective commission rate, compare two program types side-by-side, and project break-even sales to hit a target income. History (localStorage) + shareable URL. 100% client-side.
Affiliate Link Cloaker & Redirect Generator
Cloak affiliate links into pretty URLs and generate redirect scripts (PHP, JavaScript, HTML meta refresh), plus .htaccess, nginx, and robots.txt rules. CSV import of slug/affiliate_url pairs, slug auto-generator from hostname, click-tracking parameter builder, URL-shortener compatibility check, history (localStorage), shareable URL. 100% client-side.
Anchor Text Distribution Analyzer
Analyze anchor text distribution from backlink data. Categorize anchors as exact/partial match, branded, generic, naked URL, or image. Compute distribution %, warn on over-optimization, and export. 100% client-side.