4 uses

SEO

htaccess Redirect Generator

Generate Apache RewriteRule or Redirect snippets for 301 and 302 moves.

Free · No signup · Works offline

What is htaccess Redirect Generator?

Apache .htaccess redirects tell browsers and crawlers that a path has moved. Choosing 301 (permanent) versus 302 (temporary) affects how search engines treat the old URL. This generator builds both a simple Redirect line and a RewriteRule block from your from-path, destination URL, and status code. It does not upload files to your server—you copy the snippet and paste it into .htaccess yourself. Use it for WordPress migrations, consolidating duplicate paths, or sending an old campaign URL to a new landing page on Apache-compatible hosts (including many LiteSpeed setups). Nginx needs different rewrite syntax; this tool targets Apache-style rules only.

Use cases

  • You moved /old-pricing/ to /pricing/ and need a 301 RewriteRule for Apache.
  • A seasonal campaign URL should 302 to a temporary offer page without signaling a permanent move.
  • You are cleaning trailing-slash variants and want a starting snippet before refining RewriteCond rules.
  • You need both Redirect and RewriteRule formats to compare what your host’s panel expects.

How to use htaccess Redirect Generator

  1. Open the htaccess Redirect Generator on www.it3.it.com/tools/htaccess-redirect-generator/.
  2. Enter the From path (example: /old-page) and the full To URL.
  3. Choose 301 or 302, then click Generate (a default snippet appears immediately).
  4. Copy the output into .htaccess above other conflicting rules, then test on staging.

Example

Input: From /old-page → https://example.com/new-page (301)

Output: Redirect 301 /old-page https://example.com/new-page # plus RewriteEngine On / RewriteRule ^old-page$ https://example.com/new-page [R=301,L]

The tool prints both Redirect and mod_rewrite forms so you can paste the style your host supports.

Why use it3’s htaccess Redirect Generator?

Generate redirect snippets free without signup. Rules are built in your browser—no need to upload .htaccess to a third-party service. After deploying, verify the live hop with it3’s Redirect Checker.

Tips

Common mistake: editing production .htaccess without a backup. A typo can white-screen the site—keep FTP/SFTP access ready and test one rule at a time.

Key features

  • 301 and 302 status options
  • Redirect + RewriteRule output
  • Instant browser-side generation
  • No signup required
  • Copy-ready Apache snippets
  • Pairs with Redirect Checker for verification

Frequently asked questions

Will these rules work on nginx?

Not as-is. nginx uses its own rewrite/return directives. Convert the logic or use your hostu2019s nginx config tools.

When should I use 301 vs 302?

Use 301 when the move is permanent so signals can consolidate. Use 302 when the change is temporary or for short tests.

Why did my WordPress site break after pasting?

Conflicting RewriteRules or a missing RewriteEngine On line are common. Restore the backup and add rules carefully above the WordPress block only when needed.

Do I need RewriteBase?

Subdirectory installs sometimes do. If redirects misfire under /blog/, test RewriteBase on staging with logging enabled.

Is anything saved on it3 servers?

No. Snippets are generated locally in your browser.

Explore more free tools

More free SEO tools on it3.

View all tools →