Readers24
Tools

Redirect Generator

Generate ready-to-deploy 301 Permanent and 302 Temporary URL redirect snippets for both Apache .htaccess (mod_rewrite) and Nginx server blocks locally in your browser.

Website ToolsRuns Locally in Browser 100% Free • No Sign-Up
Apache .htaccess
# Apache .htaccess 301 Redirect
RewriteEngine On
RewriteRule ^old-article/$ https://www.readers24.com/new-article/ [R=301,L]
Nginx Config
# Nginx Server Block 301 Redirect
rewrite ^/old-article/$ https://www.readers24.com/new-article/ permanent;

How to Use Redirect Generator

1

Enter Old URL Path & New Destination URL

Type the source path (e.g., /old-article/) and the full canonical https:// destination URL.

2

Choose 301 Permanent or 302 Temporary

Pick 301 for permanent SEO consolidations/migrations or 302 for short-term promos/maintenance forwarding.

3

Copy Apache .htaccess or Nginx Config snippet

Use the dedicated Copy buttons (with instant Copied feedback) to paste rules into your web server config.

Practical Use Cases

  • Forward retired blog slugs cleanly to updated guide URLs via 301 permanent redirects after content consolidation.
  • Standardize uppercase or legacy URL paths cleanly inside Apache .htaccess files on shared hosting / WordPress.
  • Configure fast server-block level permanent/temporary rewrites on Nginx reverse proxies.
  • Temporarily redirect seasonal landing URLs using clean 302 headers so original indexing returns later.

Real Input & Output Examples

301 Permanent Apache & Nginx Redirect Rules

Emits exact mod_rewrite and Nginx rewrite lines simultaneously.

Sample Input
Old Path: /old-article/ | New URL: https://www.readers24.com/new-article/ | Type: 301
Actual Output
Apache .htaccess:
RewriteEngine On
RewriteRule ^old-article/$ https://www.readers24.com/new-article/ [R=301,L]

Nginx:
rewrite ^/old-article/$ https://www.readers24.com/new-article/ permanent;

302 Temporary Maintenance Redirect

Switches Apache flag to R=302 and Nginx keyword to redirect.

Sample Input
Old Path: /promo | New URL: https://www.readers24.com/explore-tools/ | Type: 302
Actual Output
Apache: RewriteRule ^promo$ https://www.readers24.com/explore-tools/ [R=302,L]
Nginx: rewrite ^/promo$ https://www.readers24.com/explore-tools/ redirect;

Features, Supported Standards & Limitations

Dual Server Output (Apache + Nginx)

Generates syntax-accurate Apache RewriteRule ([R=301,L] / [R=302,L]) and Nginx rewrite (permanent / redirect) directives side by side.

Leading-Slash Handling for .htaccess

Automatically strips leading '/' in Apache RewriteRule anchors because .htaccess directory context omits leading slashes.

301 vs 302 SEO Directive Switch

Updates flags cleanly between permanent canonical transfers (301) and temporary redirects (302).

Copy Confirmation Badges

Indicates exactly which snippet (Apache or Nginx) was copied to clipboard.

Supported Formats, Standards & Inputs

  • Apache mod_rewrite .htaccess syntax (RewriteEngine On / RewriteRule)
  • Nginx ngx_http_rewrite_module syntax (rewrite ^path$ target permanent|redirect;)
  • HTTP 301 Permanent & HTTP 302 Temporary response codes

Limitations & Compatibility

  • Generates Apache .htaccess and Nginx rewrite syntax only—does not output Next.js next.config.ts, Cloudflare Workers, or IIS web.config rules.
  • Does not automatically escape regex special characters (such as '.' or '?') if pasted inside Old Path.
  • Always verify live server redirects afterward with HTTP Status Checker to avoid infinite redirect loops.
Privacy & Execution ArchitectureAll parsing, conversion, formatting, and generation for this tool executes locally inside your web browser with zero server storage.
Read Privacy Policy

Related Workflow Tools

Complementary utilities commonly paired with Redirect Generator

Frequently Asked Questions

Why does the Apache .htaccess rule remove the leading '/' from '/old-article/' while Nginx keeps it?

Inside per-directory .htaccess files, Apache matches relative paths without a leading slash, whereas Nginx location/rewrite blocks match URIs starting with '/'.

Should I pick 301 or 302 when permanently changing a URL slug?

Always use 301 (Permanent) so search engines consolidate indexing signals and backlinks onto the new canonical URL.

Does Redirect Generator output Next.js or Vercel redirects JSON?

No—it generates Apache .htaccess and Nginx server block rules specifically.

Why shouldn't I use wildcards blindly to redirect 50 removed blog posts to the homepage?

Search engines flag mass redirects of unrelated deleted content to the homepage as Soft 404s. Only redirect pages to closely equivalent destinations, or return HTTP 404/410.

How can I verify my live redirect works after editing .htaccess or nginx.conf?

Paste the old URL into HTTP Status Checker—it uses manual redirect mode to confirm the exact 301/302 code and Location header.