Skip to content
CoolTools24

Redirect generator

Create 301 or 302 redirect rules for Apache .htaccess and Nginx.

Runs in your browser – your files are not uploaded

How to use Redirect generator

  1. 1

    Enter one redirect per line: old path, then new path or URL.

  2. 2

    Choose 301 permanent or 302 temporary.

  3. 3

    Copy the Apache or Nginx rules into your server configuration.

About Redirect generator

When you move or rename pages, redirects send visitors and search engines to the new address. Enter one redirect per line – the old path and the new path or URL – and this tool writes the matching rules for Apache (.htaccess) and Nginx side by side.

Choose a permanent 301 redirect, which passes search ranking to the new URL, or a temporary 302. For Apache, old URLs with a query string are converted into RewriteCond and RewriteRule lines.

Frequently asked questions

Should I use 301 or 302?

Use 301 when the move is permanent, such as after a relaunch. Use 302 only for temporary situations, like a maintenance page or a short campaign.

Are query strings supported?

In the Apache output, yes – an old URL like /shop?id=12 becomes a RewriteCond rule. The Nginx rules match the path only and ignore the query string.

Can I create wildcard or regex redirects?

No. Each line is an exact one-to-one redirect. Pattern-based rules for whole folders have to be written by hand.