FreeDev Tools

.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. 1

    List your redirects

    One per line: the old path, a space, then the new path or full URL.

  2. 2

    Choose type and syntax

    301 or 302; Redirect directives or RewriteRule regex.

  3. 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.