All free tools

.htaccess & Nginx Redirect Rule Generator

Turn a list of old and new paths into Apache .htaccess and Nginx 301 redirect rules.

Paste a migration map once and copy the rules for both servers.

How to use this tool

When you move or rename pages you need redirect rules in your server format. Paste a list of old and new paths and copy ready-made Apache and Nginx rules.

  1. Type or paste one redirect per line in the Redirect Map box, as /old-path -> /new-path.
  2. Check the generated rules in the dark panel on the right.
  3. Press Copy Rules.
  4. Paste the Apache lines into .htaccess or the Nginx lines into your server block, then test a few URLs.

What it checks

Questions

Does it produce vercel.json?

The generator builds a vercel.json structure internally, but this page only shows and copies the Apache and Nginx rules.

Can I choose 302 or another status?

Not in this page. All rules are 301 redirects.

Does it test the redirects?

No. It only writes the rules. Test them on your server after deploying and watch for redirect chains.

Related tools