.htaccess Redirect Generator

Turn a list of old and new URL paths into Apache .htaccess Redirect rules (301/302). Runs locally in your browser.

About this tool

Enter one rule per line as: /old-path /new-path [301|302]. Each line becomes an Apache mod_alias Redirect directive, defaulting to 301 permanent. Paste the output into the .htaccess file in your site root. Lines starting with # are ignored.

Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter