.htaccess Redirect Generator
Generate Apache .htaccess redirect rules for single pages, directories, and domains. Includes HTTPS and www options.
How to Use .htaccess Redirect Generator
The .htaccess Redirect Generator is a free online tool that creates Apache redirect rules without needing to memorize RewriteRule syntax. Choose between 301 (permanent), 302 (temporary), or 307 redirects for single pages, entire directories, or full domains. Additional options let you force HTTPS, add or remove the www prefix. The generated rules are ready to paste into your .htaccess file. Whether you are migrating a website, restructuring URLs, setting up canonical redirects, or enforcing HTTPS, this tool generates correct Apache redirect rules instantly.
Step-by-Step Instructions
- Select redirect type (301, 302, or 307) and rule type
- Enter the source path or domain
- Enter the destination URL
- Toggle HTTPS/www options and copy the generated rules
Related Tools
JSON Formatter and Validator
Format, validate, and pretty-print JSON with syntax highlighting.
Base64 Encoder and Decoder
Encode text to Base64 or decode Base64 strings back to plain text.
URL Encoder and Decoder
Encode special characters for URLs or decode percent-encoded strings.
HTML Entity Encoder and Decoder
Encode special characters as HTML entities or decode them back.