← All Tools

Htaccess Redirect Generator🔒 100% local

Apache redirect rules. Privacy-first, no server uploads, no tracking.

Related Tools

Anagram GenAscii ArtBarcode Generator

Turns a list of redirects, one per line as /old, /new[, code], into Apache .htaccess directives. Pairs whose destination is a path become anchored RewriteRules inside an IfModule block so query strings survive, while a full-URL destination becomes a plain Redirect line. The accepted codes are 301, 302, 307, 308 and 410, defaulting to 301. It prints text for you to paste and never contacts a server.

How to use it

  1. Put one rule per line: /old-page, /new-page, 301. The status code is optional.
  2. Press Process.
  3. Copy the block into .htaccess, then confirm it on the live site with curl -sI https://yourdomain.com/old-page | head -3.

Worked example

/old-page, /new-page, 301becomesGenerated 1 redirect rule(s) for .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^old-page$ /new-page [R=301,L] </IfModule>

After this block the output explains each status code, reports that no redirect chain was found, and offers an optional force-HTTPS and trailing-slash section plus the curl check.

/old-page, https://new.example.com/new-pagebecomesGenerated 1 redirect rule(s) for .htaccess: Redirect 301 /old-page https://new.example.com/new-page

A full-URL destination skips the rewrite block entirely, so no IfModule wrapper is printed around it.

When to use it

What it does not do