Htaccess Redirect Generator
Generate redirect rules from old and new paths you enter.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
Htaccess Redirect Generator
How to use this tool
- Enter your values in the fields above.
- Press Generate to see the result.
- Use Load sample to try the worked example, Copy result to copy it, or Clear to start again.
Worked example
The sample generates a 301 rule for /old-page to /new-page and a 302 rule for /old-blog to /blog.
What this tool does not do / Limits
Generated rules are plain text for you to review and place in your own server configuration. Test them on staging first; a wrong rule can break links.
Frequently asked questions
Do I paste this anywhere automatically?
No. Copy the rules, review them, and place them in your own server file yourself.
Which redirect types are supported?
301 for permanent and 302 for temporary redirects; anything else defaults to 301 and is noted.
Related tools
JSON Studio
Format, validate, minify, query and compare JSON in your browser, with precise line-and-column errors.
LiveRegex Tester
Test patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
LiveSecurity Header and DNS Checker
Check HSTS, CSP and other security headers, TLS details, and DNS/email authentication records (SPF, DKIM, DMARC).
Live