.htaccess Redirect Generator
Generate Apache 301/302 redirects β Redirect directives or RewriteRule syntax.
Runs locally in your browser. Your input is not uploaded.
How to Use
- 1
List your redirects
One per line: the old path, a space, then the new path or full URL.
- 2
Choose type and syntax
301 or 302; Redirect directives or RewriteRule regex.
- 3
Paste into .htaccess
Add the rules to your site root and test with a private browser window.
Frequently Asked Questions
- Enter each redirect as "old-path new-url" on its own line and the tool emits Redirect 301 directives (or RewriteRule syntax) you paste into the .htaccess file at your site root.
Related Tools
CSS FormatterMinify or beautify CSS stylesheetsJS FormatterMinify or beautify JavaScript codeHTML FormatterBeautify or minify HTML markupHTML EscapeEscape special HTML characters to entitiesHTML StripperRemove all HTML tags to extract plain textHTML EntitiesSearchable reference for all HTML entity codesSQL FormatterBeautify and format SQL queriesXML FormatterFormat, validate, and minify XML documents instantly