LW IT Solutions

301 Redirect Rule Generator (.htaccess, nginx, WordPress)

Paste old and new addresses, one pair per line, separated by an arrow, a tab or a comma. Everything runs in the browser. Pairs that share the same folder change collapse into one prefix rule with a wildcard, the way a renamed category needs it. A new address that is itself an old address makes a chain; the generator points the first at the last so that no visitor walks the chain. Loops and contradicting targets are reported and left out.

Nothing entered here is sent anywhere. The rules are built in the browser.

Limits worth knowing: prefix rules match everything below the old folder, including addresses that were never listed; a query-string pair becomes a RewriteCond on Apache and an if on nginx, which is deliberate but not elegant; and a rule that redirects to a host on which the same rules apply again will loop, which only a trace of the live chain shows.

OTHER TOOLS