mtools.lol

htaccess Redirect Generator

Turn a list of old and new URLs into Apache or nginx redirect rules.

How it works

  1. 1Paste one "/old /new" pair per line.
  2. 2Choose 301 or 302 and your server.
  3. 3Copy the rules into .htaccess or your nginx config.

Features

  • Apache Redirect, Apache RewriteRule and nginx.
  • Special characters escaped.
  • Bad lines reported, not guessed.
  • Private: runs in your browser; nothing is uploaded.

Frequently asked questions

301 or 302?

301 for permanent moves (search engines move the ranking); 302 for temporary ones.

Can I redirect a whole domain?

This tool maps paths. Domain moves need a host rule in your server config.