XMLDevCon
🔒 100% Client-Side
⚡ XMLDevCon

JSON & XML

JSON Viewer & FormatterXML Formatter & ValidatorXML ↔ JSON Converter

Converters

XML ↔ JSON ConverterBase64 to File ConverterJSON/XML to TS

Formatters

XML FormatterJSON Viewer

Dev Tools

TypeScript GeneratorBase64 Encoder/DecoderBase64 to File Converter

Security

Secure JWT DecoderBase64 DecoderBcrypt GeneratorBcrypt Verifier

Schema Tools

JSON to TypeScriptJSON to Zod SchemaJSON to MongooseJSON to YAMLYAML to JSON

Code & Server

HTML to JSXJSX to HTMLTS to JS TranspilerChmod Calculator.htaccess GeneratorHreflang Generator

🔒 100% Client-Side & Offline Ready

Tool

.htaccess Redirect Generator

Build fully customized Apache web server rewrite configuration commands.

.htaccess Code Output

.htaccess Redirect Generator — Developer Guide

Why Use .htaccess Redirects?

The .htaccess (hypertext access) file is a directory-level configuration file supported by Apache web servers. It allows you to manage URL redirections, rewrite paths, and enforce HTTPS access without modifying server configuration files.

Using 301 (permanent) redirects is critical for SEO:

  • Redirecting legacy URLs to new target locations prevents users from landing on broken pages.
  • Passing link authority to the new URLs helps maintain search engine rankings.

Step-by-Step Guide: How to Use this Tool

  1. Enter the relative path of the old URL (e.g. /old-page.html).
  2. Enter the absolute URL of the new page (e.g. https://www.newsite.com/new-page).
  3. Select your redirect type (301 for permanent, 302 for temporary).
  4. Optionally enable Force www canonicalization rewrite rules.
  5. Copy the generated code, paste it into your .htaccess file, and upload it to your server root.